wxPdfDocument 1.2.0
Public Member Functions | List of all members
wxPdfShape Class Reference

Class representing a shape consisting of line and curve segments. More...

#include <pdfshape.h>

Public Member Functions

 wxPdfShape ()
 Constructor.
 
virtual ~wxPdfShape ()
 Destructor.
 
void MoveTo (double x, double y)
 Begin a new subpath of the shape.
 
void LineTo (double x, double y)
 Add line segment to the shape.
 
void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
 Add a cubic Bezier curve to the shape.
 
void ClosePath ()
 Close (sub)path of the shape.
 
unsigned int GetSegmentCount () const
 Get the number of segments of the shape.
 
wxPdfSegmentType GetSegment (int iterType, int iterPoints, double coords[]) const
 Get a specific segment of the shape (for internal use only)
 

Detailed Description

Class representing a shape consisting of line and curve segments.

Constructor & Destructor Documentation

◆ wxPdfShape()

wxPdfShape::wxPdfShape ( )

Constructor.

◆ ~wxPdfShape()

virtual wxPdfShape::~wxPdfShape ( )
virtual

Destructor.

Member Function Documentation

◆ ClosePath()

void wxPdfShape::ClosePath ( )

Close (sub)path of the shape.

◆ CurveTo()

void wxPdfShape::CurveTo ( double x1,
double y1,
double x2,
double y2,
double x3,
double y3 )

Add a cubic Bezier curve to the shape.

Append a cubic Bezier curve to the current path. The curve extends from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bezier control points. The new current point is (x3, y3).

Parameters
x1Abscissa of control point 1
y1Ordinate of control point 1
x2Abscissa of control point 2
y2Ordinate of control point 2
x3Abscissa of end point
y3Ordinate of end point

◆ GetSegment()

wxPdfSegmentType wxPdfShape::GetSegment ( int iterType,
int iterPoints,
double coords[] ) const

Get a specific segment of the shape (for internal use only)

Parameters
[in]iterTypeindex of segment in segment type array
[in]iterPointsindex of segment in segment coordinate array
[out]coordsarray of segment coordinates (size: >= 8)
Returns
the type of the segment

◆ GetSegmentCount()

unsigned int wxPdfShape::GetSegmentCount ( ) const
inline

Get the number of segments of the shape.

◆ LineTo()

void wxPdfShape::LineTo ( double x,
double y )

Add line segment to the shape.

Append a straight line segment from the current point to the point (x, y). The new current point is (x, y).

Parameters
xabscissa value
yordinate value

◆ MoveTo()

void wxPdfShape::MoveTo ( double x,
double y )

Begin a new subpath of the shape.

Move to the starting point of a new (sub)path. The new current point is (x, y).

Parameters
xabscissa value
yordinate value
Remarks
This must be the first operation in constructing the shape.

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