Documentation | InterfaceKit | ShapeIterator
SYNOPSIS
Perl
use HaikuR1::ShapeIterator; my $iterator = HaikuR1::ShapeIterator->new(); $iterator->Iterate($shape);
Python
from HaikuR1.InterfaceKit import ShapeIterator iterator = ShapeIterator iterator->Iterate(shape)
DESCRIPTION
Exposes the BShapeIterator
object.
For more information on ShapeIterator, see the Be Book class description, the Be Book overview, and the Haiku Book class description.
METHODS
Constructor
Creates a ShapeIterator.
Perl
HaikuR1::ShapeIterator->new();
Python
ShapeIterator()
Iterate
Iterates over the drawing operations that make up the given shape.
Perl
$shapeiterator->Iterate($shape);
Python
shapeiterator.Iterate(shape)
shape
A Shape, a shape to iterate over.
HOOKS
IterateArcTo
Will be called once for each ArcTo operation in the Shape.
Perl
$shapeiterator->IterateArcTo( rx => $rx, ry => $ry, angle => $angle, largeArc => $largeArc, counterClockWise => $counterClockWise, point => $point, );
Python
shapeiterator.IterateArcTo( rx = rx, ry = ry, angle = angle, largeArc = largeArc, counterClockWise = counterClockWise, point = point, )
rx
,ry
Floating point numbers, the radii of the ellipse that defines the arc.
angle
A floating point number, the angle of the arc.
largeArc
A boolean; if true, use the larger of the two possible arcs.
counterClockWise
A boolean; if true, the arc will go counterclockwise.
point
A Point; the center of the ellipse.
IterateBezierTo
Will be called for BezierTo operations in the Shape.
If there is a sequence of consecutive BezierTo
operations, then this hook
will be called once for the sequence, and not once for each individual
operation.
Perl
$shapeiterator->IterateBezierTo($bezierPts);
Python
shapeiterator.IterateBezierTo(bezierPts)
bezierPts
A native list of Points. Each sequence of three points represents one Bezier curve. (Two control points and an end point.)
IterateClose
Will be called for the Close operation in the Shape. (There should only be one such operation, and it should be the final operation.)
Perl
$shapeiterator->IterateClose();
Python
shapeiterator.IterateClose()
IterateLineTo
Will be called for each LineTo operation in the Shape. If
there is a sequence of consecutive LineTo
operations, then this hook will be
called once for the sequence, and not once for each individual operation.
Perl
$shapeiterator->IterateLineTo($linePts);
Python
shapeiterator.IterateLineTo(linePts)
linePts
A native list of Points. Each point represents the end point of a line.
IterateMoveTo
Will be called for each MoveTo operation in the Shape.
Perl
$shapeiterator->IterateMoveTo($point);
Python
shapeiterator.IterateMoveTo(point)
point
The Point to move to.