# IpeSubPath Class Reference
[Ipe Objects]

A subpath of an IpePath. More...

Inherited by IpeClosedSpline, IpeEllipse, and IpeSegmentSubPath.

List of all members.

## Public Types

- enum TType { ESegments, EEllipse, EClosedSpline }

## Public Member Functions

- virtual ~IpeSubPath ()=0
- virtual TType Type () const=0
- virtual bool Closed () const
- virtual IpeSubPath * Clone () const=0
- virtual IpeSubPath * Transform (const IpeMatrix &m) const=0
- virtual const IpeEllipse * AsEllipse () const
- virtual IpeEllipse * AsEllipse ()
- virtual const IpeClosedSpline * AsClosedSpline () const
- virtual IpeClosedSpline * AsClosedSpline ()
- virtual const IpeSegmentSubPath * AsSegs () const
- virtual IpeSegmentSubPath * AsSegs ()
- virtual void SaveAsXml (IpeStream &stream) const=0
- virtual void Draw (IpePainter &painter) const=0
- virtual void AddToBBox (IpeRect &box, const IpeMatrix &m) const=0
- virtual double Distance (const IpeVector &v, const IpeMatrix &m, double bound) const=0
- virtual void SnapVtx (const IpeVector &mouse, const IpeMatrix &m, IpeVector &pos, double &bound) const=0
- virtual void SnapBnd (const IpeVector &mouse, const IpeMatrix &m, IpeVector &pos, double &bound) const=0

## Detailed Description

A subpath of an IpePath.

A subpath is either open, or closed. There are two special kinds of closed subpaths, namely ellipses and closed B-splines.

## Member Enumeration Documentation

enum IpeSubPath::TType

| The subpath types.

## Constructor & Destructor Documentation

IpeSubPath::~IpeSubPath | ( |  | ) | `[pure virtual]`

| Implementation of pure virtual destructor.

## Member Function Documentation

virtual TType IpeSubPath::Type | ( |  | ) | const`[pure virtual]`

| Return type of this subpath. Implemented in IpeEllipse, IpeClosedSpline, and IpeSegmentSubPath.

bool IpeSubPath::Closed | ( |  | ) | const`[virtual]`

| Is this subpath closed? Default implementation returns `true`. Reimplemented in IpeSegmentSubPath.

virtual IpeSubPath* IpeSubPath::Clone | ( |  | ) | const`[pure virtual]`

| Return a copy of this subpath. Implemented in IpeEllipse, IpeClosedSpline, and IpeSegmentSubPath.

virtual IpeSubPath* IpeSubPath::Transform | ( | const IpeMatrix & | m | ) | const`[pure virtual]`

| Return a transformed copy of this subpath. Implemented in IpeEllipse, IpeClosedSpline, and IpeSegmentSubPath.

const IpeEllipse * IpeSubPath::AsEllipse | ( |  | ) | const`[virtual]`

| Return this object as an IpeEllipse, or 0 if it's not an ellipse. Reimplemented in IpeEllipse.

IpeEllipse * IpeSubPath::AsEllipse | ( |  | ) | `[virtual]`

| Return this object as an IpeEllipse, or 0 if it's not an ellipse. Reimplemented in IpeEllipse.

const IpeClosedSpline * IpeSubPath::AsClosedSpline | ( |  | ) | const`[virtual]`

| Return this object as an IpeClosedSpline, or 0 if it's not a closed spline. Reimplemented in IpeClosedSpline.

IpeClosedSpline * IpeSubPath::AsClosedSpline | ( |  | ) | `[virtual]`

| Return this object as an IpeClosedSpline, or 0 if it's not a closed spline. Reimplemented in IpeClosedSpline.

const IpeSegmentSubPath * IpeSubPath::AsSegs | ( |  | ) | const`[virtual]`

| Return this object as an IpeSegmentSubPath, or else 0. Reimplemented in IpeSegmentSubPath.

IpeSegmentSubPath * IpeSubPath::AsSegs | ( |  | ) | `[virtual]`

| Return this object as an IpeSegmentSubPath, or else 0. Reimplemented in IpeSegmentSubPath.

virtual void IpeSubPath::SaveAsXml | ( | IpeStream & | stream | ) | const`[pure virtual]`

| Save subpath to XML stream. Implemented in IpeEllipse, IpeClosedSpline, and IpeSegmentSubPath.

virtual void IpeSubPath::Draw | ( | IpePainter & | painter | ) | const`[pure virtual]`

| Draw subpath (does not call DrawPath()). Implemented in IpeEllipse, IpeClosedSpline, and IpeSegmentSubPath.

virtual void IpeSubPath::AddToBBox | ( | IpeRect & | box,
|  | const IpeMatrix & | m
| ) | const`[pure virtual]`

| Add subpath to box. Implemented in IpeEllipse, IpeClosedSpline, and IpeSegmentSubPath.

virtual double IpeSubPath::Distance | ( | const IpeVector & | v,
|  | const IpeMatrix & | m,
|  | double | bound
| ) | const`[pure virtual]`

| Return distance from v to subpath transformed by m. Implemented in IpeEllipse, IpeClosedSpline, and IpeSegmentSubPath.

virtual void IpeSubPath::SnapVtx | ( | const IpeVector & | mouse,
|  | const IpeMatrix & | m,
|  | IpeVector & | pos,
|  | double & | bound
| ) | const`[pure virtual]`

| Snap to vertex. Implemented in IpeEllipse, IpeClosedSpline, and IpeSegmentSubPath.

virtual void IpeSubPath::SnapBnd | ( | const IpeVector & | mouse,
|  | const IpeMatrix & | m,
|  | IpeVector & | pos,
|  | double & | bound
| ) | const`[pure virtual]`

| Snap to boundary of subpath. Implemented in IpeEllipse, IpeClosedSpline, and IpeSegmentSubPath.

The documentation for this class was generated from the following files:

- ipepath.h
- ipepath.cpp