soui 5.0.0.1
 
Loading...
Searching...
No Matches
IPathS Struct Reference
Inheritance diagram for IPathS:
IRenderObj IObjRef

Public Member Functions

long AddRef () PURE
 Add a reference to the object.
 
long Release () PURE
 Release a reference to the object.
 
void OnFinalRelease () PURE
 Perform final release operations on the object.
 
IRenderFactoryGetRenderFactory () SCONST PURE
 Obtain the factory that created this render object.
 
OBJTYPE ObjectType () SCONST PURE
 Query the type of the object.
 
FillType getFillType () SCONST PURE
 Return the path's fill type, which defines how "inside" is computed.
 
void setFillType (FillType ft) PURE
 Set the path's fill type, which defines how "inside" is computed.
 
void reset () PURE
 Clear any lines and curves from the path, making it empty. This frees up internal storage.
 
BOOL isEmpty () SCONST PURE
 Check if the path is empty (contains no lines or curves).
 
void getBounds (LPRECT prc) SCONST PURE
 Return the bounds of the path's points.
 
void moveTo (float x, float y) PURE
 Set the beginning of the next contour to the point (x,y).
 
void rMoveTo (float dx, float dy) PURE
 Set the beginning of the next contour relative to the last point on the previous contour.
 
void lineTo (float x, float y) PURE
 Add a line from the last point to the specified point (x,y).
 
void rLineTo (float dx, float dy) PURE
 Add a line from the last point, but the coordinates are relative to the last point.
 
void quadTo (float x1, float y1, float x2, float y2) PURE
 Add a quadratic Bezier curve from the last point, approaching control point (x1,y1), and ending at (x2,y2).
 
void rQuadTo (float dx1, float dy1, float dx2, float dy2) PURE
 Add a quadratic Bezier curve, but the coordinates are relative to the last point.
 
void conicTo (float x1, float y1, float x2, float y2, float w) PURE
 Add a conic Bezier curve from the last point, approaching control point (x1,y1), and ending at (x2,y2).
 
void rConicTo (float dx1, float dy1, float dx2, float dy2, float w) PURE
 Add a conic Bezier curve, but the coordinates are relative to the last point.
 
void cubicTo (float x1, float y1, float x2, float y2, float x3, float y3) PURE
 Add a cubic Bezier curve from the last point, approaching control points (x1,y1) and (x2,y2), and ending at (x3,y3).
 
void rCubicTo (float x1, float y1, float x2, float y2, float x3, float y3) PURE
 Add a cubic Bezier curve, but the coordinates are relative to the last point.
 
void addRect (const RECT *rect, Direction dir DEF_VAL(kCW_Direction)) PURE
 Add a closed rectangle contour to the path.
 
void addRect2 (float left, float top, float right, float bottom, Direction dir DEF_VAL(kCW_Direction)) PURE
 Add a closed rectangle contour to the path.
 
void addOval (const RECT *oval, Direction dir DEF_VAL(kCW_Direction)) PURE
 Add a closed oval contour to the path.
 
void addOval2 (float left, float top, float right, float bottom, Direction dir DEF_VAL(kCW_Direction)) PURE
 Add a closed oval contour to the path.
 
void addCircle (float x, float y, float radius, Direction dir DEF_VAL(kCW_Direction)) PURE
 Add a closed circle contour to the path.
 
void addArc (const RECT *oval, float startAngle, float sweepAngle) PURE
 Add the specified arc to the path as a new contour.
 
void addArc2 (float left, float top, float right, float bottom, float startAngle, float sweepAngle) PURE
 Add the specified arc to the path as a new contour.
 
void addRoundRect (const RECT *rect, float rx, float ry, Direction dir DEF_VAL(kCW_Direction)) PURE
 Add a closed round-rectangle contour to the path.
 
void addRoundRect2 (float left, float top, float right, float bottom, float rx, float ry, Direction dir DEF_VAL(kCW_Direction)) PURE
 Add a closed round-rectangle contour to the path.
 
void addPoly (const POINT pts[], int count, BOOL close) PURE
 Add a new contour made of just lines.
 
void offset (float dx, float dy) PURE
 Offset the path by (dx,dy).
 
void transform (const IxForm *matrix) PURE
 Transform the points in this path by the given matrix.
 
BOOL getLastPt (fPoint *lastPt) SCONST PURE
 Return the last point on the path.
 
void addString (LPCTSTR pszText, int nLen, float x, float y, const IFontS *pFont) PURE
 Add a string to the path.
 
IPathSclone () SCONST PURE
 Clone the current path.
 
BOOL beginFigure (float x, float y, BOOL bFill DEF_VAL(TRUE)) PURE
 Begin a new figure in the path.
 
BOOL endFigure (BOOL bClose) PURE
 End the current figure in the path.
 
float getLength () SCONST PURE
 Get the length of the path.
 
BOOL getPosTan (float distance, fPoint *pos, fPoint *vec) SCONST PURE
 Get the position and tangent at a given distance along the path.
 
void close () PURE
 Close the current path to stop editing.
 
BOOL hitTest (float x, float y) SCONST PURE
 Test if a point hits the path.
 
BOOL hitTestStroke (float x, float y, float strokeSize) SCONST PURE
 Test if a point hits the stroked path.
 
- Public Member Functions inherited from IRenderObj
long AddRef () PURE
 
long Release () PURE
 
void OnFinalRelease () PURE
 
IRenderFactoryGetRenderFactory () SCONST PURE
 
OBJTYPE ObjectType () SCONST PURE
 
- Public Member Functions inherited from IObjRef
long AddRef () PURE
 Increases the reference count.
 
long Release () PURE
 Decreases the reference count.
 
void OnFinalRelease () PURE
 Called when the reference count reaches zero and the object is about to be released.
 

Detailed Description

Definition at line 508 of file SRender-i.h.

Member Function Documentation

◆ addArc()

void IPathS::addArc ( const RECT * oval,
float startAngle,
float sweepAngle )

Add the specified arc to the path as a new contour.

addArc

Parameters
ovalThe bounds of the oval used to define the size of the arc.
startAngleThe starting angle (in degrees) where the arc begins.
sweepAngleThe sweep angle (in degrees) measured clockwise.

◆ addArc2()

void IPathS::addArc2 ( float left,
float top,
float right,
float bottom,
float startAngle,
float sweepAngle )

Add the specified arc to the path as a new contour.

addArc2

Parameters
leftThe left side of the oval.
topThe top of the oval.
rightThe right side of the oval.
bottomThe bottom of the oval.
startAngleThe starting angle (in degrees) where the arc begins.
sweepAngleThe sweep angle (in degrees) measured clockwise.

◆ addCircle()

void IPathS::addCircle ( float x,
float y,
float radius,
Direction dir DEF_VALkCW_Direction )

Add a closed circle contour to the path.

addCircle

Parameters
xThe x-coordinate of the center of the circle.
yThe y-coordinate of the center of the circle.
radiusThe radius of the circle.
dirThe direction to wind the circle's contour. Cannot be kUnknown_Direction.

◆ addOval()

void IPathS::addOval ( const RECT * oval,
Direction dir DEF_VALkCW_Direction )

Add a closed oval contour to the path.

addOval

Parameters
ovalThe bounding oval to add as a closed contour.
dirThe direction to wind the oval's contour. Cannot be kUnknown_Direction.

◆ addOval2()

void IPathS::addOval2 ( float left,
float top,
float right,
float bottom,
Direction dir DEF_VALkCW_Direction )

Add a closed oval contour to the path.

addOval2

Parameters
leftThe left side of the oval.
topThe top of the oval.
rightThe right side of the oval.
bottomThe bottom of the oval.
dirThe direction to wind the oval's contour. Cannot be kUnknown_Direction.

◆ addPoly()

void IPathS::addPoly ( const POINT pts[],
int count,
BOOL close )

Add a new contour made of just lines.

addPoly

Parameters
ptsThe array of points defining the polygon.
countThe number of points in the array.
closeWhether to close the polygon.

◆ addRect()

void IPathS::addRect ( const RECT * rect,
Direction dir DEF_VALkCW_Direction )

Add a closed rectangle contour to the path.

addRect

Parameters
rectThe rectangle to add as a closed contour.
dirThe direction to wind the rectangle's contour. Cannot be kUnknown_Direction.

◆ addRect2()

void IPathS::addRect2 ( float left,
float top,
float right,
float bottom,
Direction dir DEF_VALkCW_Direction )

Add a closed rectangle contour to the path.

addRect2

Parameters
leftThe left side of the rectangle.
topThe top of the rectangle.
rightThe right side of the rectangle.
bottomThe bottom of the rectangle.
dirThe direction to wind the rectangle's contour. Cannot be kUnknown_Direction.

◆ addRoundRect()

void IPathS::addRoundRect ( const RECT * rect,
float rx,
float ry,
Direction dir DEF_VALkCW_Direction )

Add a closed round-rectangle contour to the path.

addRoundRect

Parameters
rectThe bounds of the round-rectangle.
rxThe x-radius of the rounded corners.
ryThe y-radius of the rounded corners.
dirThe direction to wind the rectangle's contour. Cannot be kUnknown_Direction.

◆ addRoundRect2()

void IPathS::addRoundRect2 ( float left,
float top,
float right,
float bottom,
float rx,
float ry,
Direction dir DEF_VALkCW_Direction )

Add a closed round-rectangle contour to the path.

addRoundRect2

Parameters
leftThe left side of the round-rectangle.
topThe top of the round-rectangle.
rightThe right side of the round-rectangle.
bottomThe bottom of the round-rectangle.
rxThe x-radius of the rounded corners.
ryThe y-radius of the rounded corners.
dirThe direction to wind the rectangle's contour. Cannot be kUnknown_Direction.

◆ addString()

void IPathS::addString ( LPCTSTR pszText,
int nLen,
float x,
float y,
const IFontS * pFont )

Add a string to the path.

addString

Parameters
pszTextThe string to add.
nLenThe length of the string.
xThe x-coordinate of the starting position.
yThe y-coordinate of the starting position.
pFontThe font to use for the text.

◆ beginFigure()

BOOL IPathS::beginFigure ( float x,
float y,
BOOL bFill DEF_VALTRUE )

Begin a new figure in the path.

beginFigure

Parameters
xThe x-coordinate of the starting point.
yThe y-coordinate of the starting point.
bFillWhether to fill the figure. Default is TRUE.
Returns
BOOL – TRUE if successful.

◆ clone()

IPathS * IPathS::clone ( )

Clone the current path.

clone

Returns
IPathS* – A pointer to the cloned path.

◆ close()

void IPathS::close ( )

Close the current path to stop editing.

close

◆ conicTo()

void IPathS::conicTo ( float x1,
float y1,
float x2,
float y2,
float w )

Add a conic Bezier curve from the last point, approaching control point (x1,y1), and ending at (x2,y2).

conicTo

Parameters
x1The x-coordinate of the control point.
y1The y-coordinate of the control point.
x2The x-coordinate of the end point.
y2The y-coordinate of the end point.
wThe weight of the control point.

◆ cubicTo()

void IPathS::cubicTo ( float x1,
float y1,
float x2,
float y2,
float x3,
float y3 )

Add a cubic Bezier curve from the last point, approaching control points (x1,y1) and (x2,y2), and ending at (x3,y3).

cubicTo

Parameters
x1The x-coordinate of the 1st control point.
y1The y-coordinate of the 1st control point.
x2The x-coordinate of the 2nd control point.
y2The y-coordinate of the 2nd control point.
x3The x-coordinate of the end point.
y3The y-coordinate of the end point.

◆ endFigure()

BOOL IPathS::endFigure ( BOOL bClose)

End the current figure in the path.

endFigure

Parameters
bCloseWhether to close the figure.
Returns
BOOL – TRUE if successful.

◆ getBounds()

void IPathS::getBounds ( LPRECT prc)

Return the bounds of the path's points.

getBounds

Parameters
prcThe rectangle to receive the bounds.

◆ getFillType()

FillType IPathS::getFillType ( )

Return the path's fill type, which defines how "inside" is computed.

getFillType

Returns
FillType – The path's fill type.

◆ getLastPt()

BOOL IPathS::getLastPt ( fPoint * lastPt)

Return the last point on the path.

getLastPt

Parameters
lastPtThe structure to receive the last point.
Returns
BOOL – TRUE if there are points, FALSE otherwise.

◆ getLength()

float IPathS::getLength ( )

Get the length of the path.

getLength

Returns
float – The length of the path.

◆ getPosTan()

BOOL IPathS::getPosTan ( float distance,
fPoint * pos,
fPoint * vec )

Get the position and tangent at a given distance along the path.

getPosTan

Parameters
distanceThe distance along the path.
posThe structure to receive the position.
vecThe structure to receive the tangent vector.
Returns
BOOL – TRUE if successful.

◆ GetRenderFactory()

IRenderFactory * IPathS::GetRenderFactory ( )

Obtain the factory that created this render object.

GetRenderFactory

Returns
IRenderFactory * – The factory.

◆ hitTest()

BOOL IPathS::hitTest ( float x,
float y )

Test if a point hits the path.

hitTest

Parameters
xThe x-coordinate of the point.
yThe y-coordinate of the point.
Returns
BOOL – TRUE if the point hits the path.

◆ hitTestStroke()

BOOL IPathS::hitTestStroke ( float x,
float y,
float strokeSize )

Test if a point hits the stroked path.

hitTestStroke

Parameters
xThe x-coordinate of the point.
yThe y-coordinate of the point.
strokeSizeThe stroke size.
Returns
BOOL – TRUE if the point hits the stroked path.

◆ isEmpty()

BOOL IPathS::isEmpty ( )

Check if the path is empty (contains no lines or curves).

isEmpty

Returns
BOOL – TRUE if the path is empty.

◆ lineTo()

void IPathS::lineTo ( float x,
float y )

Add a line from the last point to the specified point (x,y).

lineTo

Parameters
xThe x-coordinate of the end of a line.
yThe y-coordinate of the end of a line.

◆ moveTo()

void IPathS::moveTo ( float x,
float y )

Set the beginning of the next contour to the point (x,y).

moveTo

Parameters
xThe x-coordinate of the start of a new contour.
yThe y-coordinate of the start of a new contour.

◆ ObjectType()

OBJTYPE IPathS::ObjectType ( )

Query the type of the object.

ObjectType

Returns
const UINT – The object type.

◆ offset()

void IPathS::offset ( float dx,
float dy )

Offset the path by (dx,dy).

offset

Parameters
dxThe amount in the X direction to offset the entire path.
dyThe amount in the Y direction to offset the entire path.

◆ quadTo()

void IPathS::quadTo ( float x1,
float y1,
float x2,
float y2 )

Add a quadratic Bezier curve from the last point, approaching control point (x1,y1), and ending at (x2,y2).

quadTo

Parameters
x1The x-coordinate of the control point.
y1The y-coordinate of the control point.
x2The x-coordinate of the end point.
y2The y-coordinate of the end point.

◆ rConicTo()

void IPathS::rConicTo ( float dx1,
float dy1,
float dx2,
float dy2,
float w )

Add a conic Bezier curve, but the coordinates are relative to the last point.

rConicTo

Parameters
dx1The amount to add to the x-coordinate of the last point to specify the control point.
dy1The amount to add to the y-coordinate of the last point to specify the control point.
dx2The amount to add to the x-coordinate of the last point to specify the end point.
dy2The amount to add to the y-coordinate of the last point to specify the end point.
wThe weight of the control point.

◆ rCubicTo()

void IPathS::rCubicTo ( float x1,
float y1,
float x2,
float y2,
float x3,
float y3 )

Add a cubic Bezier curve, but the coordinates are relative to the last point.

rCubicTo

Parameters
x1The x-coordinate of the 1st control point.
y1The y-coordinate of the 1st control point.
x2The x-coordinate of the 2nd control point.
y2The y-coordinate of the 2nd control point.
x3The x-coordinate of the end point.
y3The y-coordinate of the end point.

◆ reset()

void IPathS::reset ( )

Clear any lines and curves from the path, making it empty. This frees up internal storage.

reset

◆ rLineTo()

void IPathS::rLineTo ( float dx,
float dy )

Add a line from the last point, but the coordinates are relative to the last point.

rLineTo

Parameters
dxThe amount to add to the x-coordinate of the previous point.
dyThe amount to add to the y-coordinate of the previous point.

◆ rMoveTo()

void IPathS::rMoveTo ( float dx,
float dy )

Set the beginning of the next contour relative to the last point on the previous contour.

rMoveTo

Parameters
dxThe amount to add to the x-coordinate of the end of the previous contour.
dyThe amount to add to the y-coordinate of the end of the previous contour.

◆ rQuadTo()

void IPathS::rQuadTo ( float dx1,
float dy1,
float dx2,
float dy2 )

Add a quadratic Bezier curve, but the coordinates are relative to the last point.

rQuadTo

Parameters
dx1The amount to add to the x-coordinate of the last point to specify the control point.
dy1The amount to add to the y-coordinate of the last point to specify the control point.
dx2The amount to add to the x-coordinate of the last point to specify the end point.
dy2The amount to add to the y-coordinate of the last point to specify the end point.

◆ setFillType()

void IPathS::setFillType ( FillType ft)

Set the path's fill type, which defines how "inside" is computed.

setFillType

Parameters
ftThe new fill type for this path.

◆ transform()

void IPathS::transform ( const IxForm * matrix)

Transform the points in this path by the given matrix.

transform

Parameters
matrixThe transformation matrix to apply to the path.

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