Table of Contents

Class Subpath

Namespace
iText.Kernel.Geom
Assembly
itext.kernel.dll

As subpath is a part of a path comprising a sequence of connected segments.

public class Subpath
Inheritance
Subpath
Inherited Members

Constructors

Subpath()

Creates a new SubPath instance.

public Subpath()

Subpath(float, float)

Constructs a new subpath starting at the given point.

public Subpath(float startPointX, float startPointY)

Parameters

startPointX float

x-coordinate of the start point of subpath

startPointY float

y-coordinate of the start point of subpath

Subpath(Point)

Constructs a new subpath starting at the given point.

public Subpath(Point startPoint)

Parameters

startPoint Point

the point this subpath starts at

Subpath(Subpath)

Copy constructor.

public Subpath(Subpath subpath)

Parameters

subpath Subpath

Subpath which contents will be used to create this Subpath

Methods

AddSegment(IShape)

Adds a segment to the subpath.

public virtual void AddSegment(IShape segment)

Parameters

segment IShape

new segment.

Remarks

Adds a segment to the subpath. Note: each new segment shall start at the end of the previous segment.

GetLastPoint()

public virtual Point GetLastPoint()

Returns

Point

The last point of the subpath.

GetPiecewiseLinearApproximation()

public virtual IList<Point> GetPiecewiseLinearApproximation()

Returns

IList<Point>

containing points of piecewise linear approximation for this subpath.

GetSegments()

public virtual IList<IShape> GetSegments()

Returns

IList<IShape>

comprising all the segments the subpath made on.

GetStartPoint()

public virtual Point GetStartPoint()

Returns

Point

The point this subpath starts at.

IsClosed()

Returns a boolean value indicating whether the subpath must be closed or not.

public virtual bool IsClosed()

Returns

bool

boolean value indicating whether the path must be closed or not.

Remarks

Returns a boolean value indicating whether the subpath must be closed or not. Ignore this value if the subpath is a rectangle because in this case it is already closed (of course if you paint the path using re operator)

IsDegenerate()

Returns a boolean indicating whether the subpath is degenerate or not.

public virtual bool IsDegenerate()

Returns

bool

boolean value indicating whether the path is degenerate or not.

Remarks

Returns a boolean indicating whether the subpath is degenerate or not. A degenerate subpath is the subpath consisting of a single-point closed path or of two or more points at the same coordinates.

IsEmpty()

Checks whether subpath is empty or not.

public virtual bool IsEmpty()

Returns

bool

true if the subpath is empty, false otherwise.

IsSinglePointClosed()

public virtual bool IsSinglePointClosed()

Returns

bool

true if this subpath contains only one point and it is closed, false otherwise

IsSinglePointOpen()

public virtual bool IsSinglePointOpen()

Returns

bool

true if this subpath contains only one point and it is not closed, false otherwise

SetClosed(bool)

public virtual void SetClosed(bool closed)

Parameters

closed bool

boolean value indicating whether the path is closed or not.

SetStartPoint(float, float)

Sets the start point of the subpath.

public virtual void SetStartPoint(float x, float y)

Parameters

x float

x-coordinate of the start pint

y float

y-coordinate of the start pint

SetStartPoint(Point)

Sets the start point of the subpath.

public virtual void SetStartPoint(Point startPoint)

Parameters

startPoint Point

the point this subpath starts at