Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

void addPath(IPath* src, AffineMatrix* matrix)
This method adds a copy of src path to the IPathBuilder transformed by AffineMatrix

Parameters

src
IPath* — Required The path to add as a new contour.
matrix
AffineMatrix* — Required transform to be applied to src

addRect()

void addRect(Rect* rect, WindingDirection direction)
This method adds a new contour to the IPathBuilder, defined by the 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()

void addRRect(RRect* rRect, WindingDirection direction)
This method adds a new contour to the IPathBuilder, defined by the 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()

void addOval(Rect* rect, WindingDirection direction)
This method adds a new contour to the IPathBuilder, defined by the 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()

void cubicTo(Point p1, Point p2, Point p3)
This method adds a cubic bezier from the last 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()

void lineTo(Point p)
This method adds a line from the last Point to the specified Point

Parameters

p
Point — Required co-ordinate of the end of the line

moveTo()

void moveTo(Point p)
This method sets the beginning of the next contour to the given Point

Parameters

p
Point — Required the start Point of the new contour

quadTo()

void quadTo(Point p1, Point p2)
This method adds a quadratic bezier from the last 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()

void setFillType(FillType fillType)
This method sets the path fill type.

Parameters

fillType
FillType — Required the fill type to associate with a path. FillType

getLastPoint()

bool getLastPoint(out Point* point)
Gets the last point of the path added to the builder.

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()

IPath* 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.

Returns

IPath* The IPath object with the specified operations.
Last modified on October 29, 2026