Object
goog.graphics.Path
|
Appends another path to the end of this path.
Arguments:
Returns:
This path.
|
code » | ||||||||
|
Adds a path command to draw an arc centered at the point {@code (cx, cy)}
with radius {@code rx} along the x-axis and {@code ry} along the y-axis from
{@code startAngle} through {@code extent} degrees. Positive rotation is in
the direction from positive x-axis to positive y-axis.
Arguments:
Returns:
The path itself.
|
code » | ||||||||
|
Adds a path command to draw an arc starting at the path's current point,
with radius {@code rx} along the x-axis and {@code ry} along the y-axis from
{@code startAngle} through {@code extent} degrees. Positive rotation is in
the direction from positive x-axis to positive y-axis.
This method makes the path non-simple.
Arguments:
Returns:
The path itself.
|
code » | ||||||||
|
Same as {@code arcTo}, but approximates the arc using bezier curves.
.* As a result, this method does not affect the simplified status of this path.
The algorithm is adapted from {@code java.awt.geom.ArcIterator}.
Arguments:
Returns:
The path itself.
|
code » | ||||||||
|
Clears the path.
Returns:
The path itself.
|
code » | ||||||||
|
No description.
Returns:
A copy of this path.
|
code » | ||||||||
|
Adds a path command to close the path by connecting the
last point to the first point.
Returns:
The path itself.
|
code » | ||||||||
|
Creates a transformed copy of this path. The path is simplified
{@see #createSimplifiedPath} prior to transformation.
Arguments:
Returns:
A new, transformed path.
|
code » | ||||||||
|
Adds points to the path by drawing cubic Bezier curves. Each curve is
specified using 3 points (6 coordinates) - two control points and the end
point of the curve.
Arguments:
Returns:
The path itself.
|
code » | ||||||||
forEachSegment(callback)
Iterates over the path calling the supplied callback once for each path
segment. The arguments to the callback function are the segment type and
an array of its arguments.
The {@code LINETO} and {@code CURVETO} arrays can contain multiple
segments of the same type. The number of segments is the length of the
array divided by the segment length (2 for lines, 6 for curves).
As a convenience the {@code ARCTO} segment also includes the end point as the
last two arguments: {@code rx, ry, fromAngle, extent, x, y}.
Arguments:
|
code » | ||||||||
|
Returns the coordinates most recently added to the end of the path.
|
code » | ||||||||
|
No description.
Returns:
Whether the path is empty.
|
code » | ||||||||
|
Returns true if this path contains no arcs. Simplified paths can be
created using {@code createSimplifiedPath}.
Returns:
True if the path contains no arcs.
|
code » | ||||||||
|
Adds points to the path by drawing a straight line to each point.
Arguments:
Returns:
The path itself.
|
code » | ||||||||
|
Adds a point to the path by moving to the specified point. Repaeated moveTo
commands are collapsed into a single moveTo.
Arguments:
Returns:
The path itself.
|
code » | ||||||||
|
Transforms the path. Only simple paths are transformable. Attempting
to transform a non-simple path will throw an error.
Arguments:
Returns:
The path itself.
|
code » |
|
Creates a copy of the given path, replacing {@code arcTo} with
{@code arcToAsCurves}. The resulting path is simplified and can
be transformed.
Arguments:
Returns:
A new simplified path.
|
code » | ||
|
Returns the number of points for a segment type.
|
code » |