iText 9.0.0 API
iText.Kernel.Geom.Subpath Class Reference

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

Public Member Functions

  Subpath ()
  Creates a new SubPath instance. More...
 
  Subpath (iText.Kernel.Geom.Subpath subpath)
  Copy constructor. More...
 
  Subpath (Point startPoint)
  Constructs a new subpath starting at the given point. More...
 
  Subpath (float startPointX, float startPointY)
  Constructs a new subpath starting at the given point. More...
 
virtual void  SetStartPoint (Point startPoint)
  Sets the start point of the subpath. More...
 
virtual void  SetStartPoint (float x, float y)
  Sets the start point of the subpath. More...
 
virtual Point  GetStartPoint ()
 
Returns
The point this subpath starts at.

 
virtual Point  GetLastPoint ()
 
Returns
The last point of the subpath.

 
virtual void  AddSegment (IShape segment)
  Adds a segment to the subpath. More...
 
virtual IList< IShape GetSegments ()
 
virtual bool  IsEmpty ()
  Checks whether subpath is empty or not. More...
 
virtual bool  IsSinglePointOpen ()
 
virtual bool  IsSinglePointClosed ()
 
virtual bool  IsClosed ()
  Returns a boolean value indicating whether the subpath must be closed or not. More...
 
virtual void  SetClosed (bool closed)
  See IsClosed() More...
 
virtual bool  IsDegenerate ()
  Returns a boolean indicating whether the subpath is degenerate or not. More...
 
virtual IList< Point GetPiecewiseLinearApproximation ()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Subpath() [1/4]

iText.Kernel.Geom.Subpath.Subpath ( )
inline

Creates a new SubPath instance.

◆ Subpath() [2/4]

iText.Kernel.Geom.Subpath.Subpath ( iText.Kernel.Geom.Subpath  subpath )
inline

Copy constructor.

Parameters
subpath

Subpath which contents will be used to create this Subpath

◆ Subpath() [3/4]

iText.Kernel.Geom.Subpath.Subpath ( Point  startPoint )
inline

Constructs a new subpath starting at the given point.

Parameters
startPoint the point this subpath starts at

◆ Subpath() [4/4]

iText.Kernel.Geom.Subpath.Subpath ( float  startPointX,
float  startPointY 
)
inline

Constructs a new subpath starting at the given point.

Parameters
startPointX x-coordinate of the start point of subpath
startPointY y-coordinate of the start point of subpath

Member Function Documentation

◆ AddSegment()

virtual void iText.Kernel.Geom.Subpath.AddSegment ( IShape  segment )
inlinevirtual

Adds a segment to the subpath.

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

Parameters
segment new segment.

◆ GetPiecewiseLinearApproximation()

virtual IList<Point> iText.Kernel.Geom.Subpath.GetPiecewiseLinearApproximation ( )
inlinevirtual
Returns

System.Collections.IList containing points of piecewise linear approximation for this subpath.

◆ GetSegments()

virtual IList<IShape> iText.Kernel.Geom.Subpath.GetSegments ( )
inlinevirtual
Returns

System.Collections.IList comprising all the segments the subpath made on.

◆ IsClosed()

virtual bool iText.Kernel.Geom.Subpath.IsClosed ( )
inlinevirtual

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

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)

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

◆ IsDegenerate()

virtual bool iText.Kernel.Geom.Subpath.IsDegenerate ( )
inlinevirtual

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

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.

Returns
boolean value indicating whether the path is degenerate or not.

◆ IsEmpty()

virtual bool iText.Kernel.Geom.Subpath.IsEmpty ( )
inlinevirtual

Checks whether subpath is empty or not.

Returns
true if the subpath is empty, false otherwise.

◆ IsSinglePointClosed()

virtual bool iText.Kernel.Geom.Subpath.IsSinglePointClosed ( )
inlinevirtual
Returns
true if this subpath contains only one point and it is closed, false otherwise

◆ IsSinglePointOpen()

virtual bool iText.Kernel.Geom.Subpath.IsSinglePointOpen ( )
inlinevirtual
Returns
true if this subpath contains only one point and it is not closed, false otherwise

◆ SetClosed()

virtual void iText.Kernel.Geom.Subpath.SetClosed ( bool  closed )
inlinevirtual

See IsClosed()

Parameters
closed boolean value indicating whether the path is closed or not.

◆ SetStartPoint() [1/2]

virtual void iText.Kernel.Geom.Subpath.SetStartPoint ( float  x,
float  y 
)
inlinevirtual

Sets the start point of the subpath.

Parameters
x x-coordinate of the start pint
y y-coordinate of the start pint

◆ SetStartPoint() [2/2]

virtual void iText.Kernel.Geom.Subpath.SetStartPoint ( Point  startPoint )
inlinevirtual

Sets the start point of the subpath.

Parameters
startPoint the point this subpath starts at