Interface IPathBuilder
interface IPathBuilder
Extends com.amazon.apmf.IStandard
IPathBuilder interface helps in constructing a Path object with specificied path operations.
with operations such as addPath, ArcTo etc.
Methods
addPath()
This method adds a copy of src path to the IPathBuilder transformed byvoidaddPath(IPath*src,AffineMatrix*matrix)
AffineMatrix
Parameters
src
IPath* — Required
The path to add as a new contour.
matrix
AffineMatrix* — Required
transform to be applied to src
addRect()
This method adds a new contour to the IPathBuilder, defined by thevoidaddRect(Rect*rect,WindingDirectiondirection)
Rect and wound in specified direction.
Parameters
rect
Rect* — Required
Rect to add as a closed contour to the path.
direction
WindingDirection — Required
clockwise or counterclockwise for the given contour
addRRect()
This method adds a new contour to the IPathBuilder, defined by thevoidaddRRect(RRect*rRect,WindingDirectiondirection)
RRect and wound in specified direction.
Parameters
rRect
RRect* — Required
RRect to add as a closed contour to the path.
direction
WindingDirection — Required
clockwise or counterclockwise for the given contour
addOval()
This method adds a new contour to the IPathBuilder, defined by thevoidaddOval(Rect*rect,WindingDirectiondirection)
Rect and wound in specified direction.
Parameters
rect
Rect* — Required
Rect to add as a closed contour to the path.
direction
WindingDirection — Required
clockwise or counterclockwise for the given contour
cubicTo()
This method adds a cubic bezier from the lastvoidcubicTo(Pointp1,Pointp2,Pointp3)
Point, approaching control Point p1 and p2, and ending at p3.
Parameters
p1
Point — Required
First control Point on a cubic curve
p2
Point — Required
Second control Point on a cubic curve
p3
Point — Required
End Point on a cubic curve
lineTo()
This method adds a line from the lastvoidlineTo(Pointp)
Point to the specified Point
Parameters
p
Point — Required
co-ordinate of the end of the line
moveTo()
This method sets the beginning of the next contour to the givenvoidmoveTo(Pointp)
Point
Parameters
p
Point — Required
the start Point of the new contour
quadTo()
This method adds a quadratic bezier from the lastvoidquadTo(Pointp1,Pointp2)
Point, approaching control Point p1, ending at Point p2.
Parameters
p1
Point — Required
control Point on the quadratic curve
p2
Point — Required
end Point on a quadratic curve
close()
void close()
This method closes the current contour. If the current Point is not equal to the first Point of the contour, a line segment is automatically added.
setFillType()
This method sets the path fill type.voidsetFillType(FillTypefillType)
Parameters
fillType
FillType — Required
the fill type to associate with a path. FillType
getLastPoint()
Gets the last point of the path added to the builder.boolgetLastPoint(outPoint*point)
Parameters
point (out)
Point* — Required
last Point added to the builder
Returns
bool
Returns true if path is non-empty or else return false with Point untouched.
build()
This method builds and returns the constructed IPath object. IPathBuilder will retain any data that has been already applied and returns new IPath instance with the all the properties previously set. When this function is called again without any changes to the path, it returns a new instance of IPath with same logical path underneath.IPath*build()
Returns
IPath*
The IPath object with the specified operations.

