Loading...
Searching...
No Matches
Public Member Functions | List of all members
BShapeIterator Class Reference

Allows you to iterate through BShape operations. More...

Public Member Functions

 BShapeIterator ()
 Constructor, does nothing.
 
virtual ~BShapeIterator ()
 Destructor, does nothing.
 
status_t Iterate (BShape *shape)
 Iterates over each operation that make up the BShape calling IterateMoveTo(), IterateLineTo(), IterateBezierTo(), IterateClose() or IterateArcTo() depending on the operation.
 
virtual status_t IterateArcTo (float &rx, float &ry, float &angle, bool largeArc, bool counterClockWise, BPoint &point)
 Called by Iterate() to act on an arc.
 
virtual status_t IterateBezierTo (int32 bezierCount, BPoint *bezierPoints)
 Called by Iterate() to act on bezierCount Bézier curves comprised of the points specified by bezierPoints.
 
virtual status_t IterateClose ()
 Called by Iterate() to close the BShape.
 
virtual status_t IterateLineTo (int32 lineCount, BPoint *linePoints)
 Called by Iterate() to act on lineCount lines comprised of the points specified by linePoints.
 
virtual status_t IterateMoveTo (BPoint *point)
 Called by Iterate() to act on point.
 

Detailed Description

Allows you to iterate through BShape operations.

You should override this class and implement the IterateMoveTo(), IterateLineTo(), IterateBezierTo(), IterateClose(), and IterateArcTo() methods which correspond to BShape::MoveTo(), BShape::LineTo(), BShape::BezierTo(), BShape::Close() and BShape::ArcTo() respectively.

See also
BShape
Since
BeOS R4

Constructor & Destructor Documentation

◆ BShapeIterator()

BShapeIterator::BShapeIterator ( )

Constructor, does nothing.

This method does nothing and should be implemented by derived classes.

Since
BeOS R4

◆ ~BShapeIterator()

BShapeIterator::~BShapeIterator ( )
virtual

Destructor, does nothing.

This method does nothing and should be implemented by derived classes.

Since
BeOS R4

Member Function Documentation

◆ Iterate()

status_t BShapeIterator::Iterate ( BShape shape)

Iterates over each operation that make up the BShape calling IterateMoveTo(), IterateLineTo(), IterateBezierTo(), IterateClose() or IterateArcTo() depending on the operation.

shape The BShape object to iterate through.

Returns
Always returns B_OK. You should override this method to return an appropriate status code.
Since
BeOS R4

◆ IterateArcTo()

status_t BShapeIterator::IterateArcTo ( float &  rx,
float &  ry,
float &  angle,
bool  largeArc,
bool  counterClockWise,
BPoint point 
)
virtual

Called by Iterate() to act on an arc.

Parameters
rxThe horizontal radius of the arc to act on.
ryThe vertical radius of the arc to act on.
angleThe starting angle of the arc in degrees to act on.
largeArcWhether or not to draw a large arc.
counterClockWisetrue if the arc is drawn counter-clockwise, false if the arc is drawn clockwise.
pointThe center point of the arc to act on.

This method does nothing and should be implemented by derived classes.

Returns
Always returns B_OK. You should override this method to return an appropriate status code.
Since
Haiku R1

◆ IterateBezierTo()

status_t BShapeIterator::IterateBezierTo ( int32  bezierCount,
BPoint bezierPoints 
)
virtual

Called by Iterate() to act on bezierCount Bézier curves comprised of the points specified by bezierPoints.

This method does nothing and should be implemented by derived classes.

Parameters
bezierCountThe number of points in bezierPoints.
bezierPointsThe list of Bézier curve points to act on.
Returns
Always returns B_OK. You should override this method to return an appropriate status code.
Since
BeOS R4

◆ IterateClose()

status_t BShapeIterator::IterateClose ( )
virtual

Called by Iterate() to close the BShape.

This method does nothing and should be implemented by derived classes.

Returns
Always returns B_OK. You should override this method to return an appropriate status code.
Since
BeOS R4

◆ IterateLineTo()

status_t BShapeIterator::IterateLineTo ( int32  lineCount,
BPoint linePoints 
)
virtual

Called by Iterate() to act on lineCount lines comprised of the points specified by linePoints.

This method does nothing and should be implemented by derived classes.

Parameters
lineCountThe number of points in linePoints.
linePointsThe list of points of lines to act on.
Returns
Always returns B_OK. You should override this method to return an appropriate status code.
Since
BeOS R4

◆ IterateMoveTo()

status_t BShapeIterator::IterateMoveTo ( BPoint point)
virtual

Called by Iterate() to act on point.

This method does nothing and should be implemented by derived classes.

Parameters
pointThe point to act on.
Returns
Always returns B_OK. You should override this method to return an appropriate status code.
Since
BeOS R4