transform
method.
goog.graphics.Path |
goog.graphics.ext.Path | goog.graphics.Path |
Appends another path to the end of this path.
Arguments:
Returns: !goog.graphics.Path
This path.
|
code » | ||||||||
Use
arcTo or arcToAsCurves instead.
Adds a path command to draw an arc centered at the point (cx, cy)
with radius rx along the x-axis and ry along the y-axis from
startAngle through extent degrees. Positive rotation is in
the direction from positive x-axis to positive y-axis.
Arguments:
Returns: !goog.graphics.Path
The path itself.
|
code » | ||||||||
Adds a path command to draw an arc starting at the path's current point,
with radius
rx along the x-axis and ry along the y-axis from
startAngle through 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: !goog.graphics.Path
The path itself.
|
code » | ||||||||
Same as
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 java.awt.geom.ArcIterator .
Arguments:
Returns: !goog.graphics.Path
The path itself.
|
code » | ||||||||
Clears the path.
Returns: !goog.graphics.Path
The path itself.
|
code » | ||||||||
No description.
Returns: !goog.graphics.Path
A copy of this path.
|
code » | ||||||||
Adds a path command to close the path by connecting the
last point to the first point.
Returns: !goog.graphics.Path
The path itself.
|
code » | ||||||||
Creates a transformed copy of this path. The path is simplified
prior to transformation.
Arguments:
Returns: !goog.graphics.Path
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: !goog.graphics.Path
The path itself.
|
code » | ||||||||
![]()
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
LINETO and 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 ARCTO segment also includes the end point as the
last two arguments: rx, ry, fromAngle, extent, x, y .
Arguments:
|
code » | ||||||||
Returns the coordinates most recently added to the end of the path.
|
code » | ||||||||
No description.
Returns: boolean
Whether the path is empty.
|
code » | ||||||||
Returns true if this path contains no arcs. Simplified paths can be
created using
createSimplifiedPath .
Returns: boolean
True if the path contains no arcs.
|
code » | ||||||||
Adds points to the path by drawing a straight line to each point.
Arguments:
Returns: !goog.graphics.Path
The path itself.
|
code » | ||||||||
Adds a point to the path by moving to the specified point. Repeated moveTo
commands are collapsed into a single moveTo.
Arguments:
Returns: !goog.graphics.Path
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: !goog.graphics.Path
The path itself.
|
code » |
![]()
The arguments corresponding to each of the segments.
|
Code » | |
![]()
The coordinates of the point which closes the path (the point of the
last moveTo command).
|
Code » | |
![]()
The number of repeated segments of the current type.
|
Code » | |
![]()
The coordinates most recently added to the end of the path.
|
Code » | |
![]()
The segment types that constitute this path.
|
Code » | |
![]()
Flag for whether this is a simple path (contains no arc segments).
|
Code » |
Creates a copy of the given path, replacing
arcTo with
arcToAsCurves . The resulting path is simplified and can
be transformed.
Arguments:
Returns: !goog.graphics.Path
A new simplified path.
|
code » | ||
Returns the number of points for a segment type.
|
code » |
![]()
The number of points for each segment type.
|
Code » | |
![]()
A map from segment type to the path function to call to simplify a path.
|
Code » |
![]()
Path segment types.
Constants:
|
Code » |