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)
shapeA 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,ryFloating point numbers, the radii of the ellipse that defines the arc.
angleA floating point number, the angle of the arc.
largeArcA boolean; if true, use the larger of the two possible arcs.
counterClockWiseA boolean; if true, the arc will go counterclockwise.
pointA 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)
bezierPtsA 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)
linePtsA 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)
pointThe Point to move to.