|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface represents an "SVGPath" datatype used to define the path geometry. Corresponds to SVG path specification or the "d" attribute.
The native implementations must support the following simplifications or canonicalization of path segments. Any simplifications should be lossless.
| Field Summary | ||
static short |
CLOSE
Numeric value is ASCII code of the letter 'Z'. |
|
static short |
CURVE_TO
Numeric value is ASCII code of the letter 'C'. |
|
static short |
LINE_TO
Numeric value is ASCII code of the letter 'L'. |
|
static short |
MOVE_TO
Numeric value is ASCII code of the letter 'M'. |
|
static short |
QUAD_TO
Numeric value is ASCII code of the letter 'Q'. |
|
| Method Summary | ||
void |
close()
Appends 'Z' (close path) segment to the path |
|
void |
curveTo(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
Appends 'C' (absolute cubic curve) segment to the path. |
|
int |
getNumberOfSegments()
Return number of segments in this path. |
|
short |
getSegment(int cmdIndex)
Returns segment command by zero-based command index. |
|
float |
getSegmentParam(int cmdIndex,
int paramIndex)
Returns segment parameter by zero-based command index and zero-based parameter index. |
|
void |
lineTo(float x,
float y)
Appends 'L' (absolute line) segment to the path with the specified coordinates. |
|
void |
moveTo(float x,
float y)
Appends 'M' (absolute move) segment to the path with the specified coordinates. |
|
void |
quadTo(float x1,
float y1,
float x2,
float y2)
Appends 'Q' (absolute quadratic curve) segment to the path. |
|
| Field Detail |
public static final short CLOSE
public static final short CURVE_TO
public static final short LINE_TO
public static final short MOVE_TO
public static final short QUAD_TO
| Method Detail |
public void curveTo(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
Appends 'C' (absolute cubic curve) segment to the path.
x1 - the x-axis coordinate of the first control point.y1 - the y-axis coordinate of the first control point.x2 - the x-axis coordinate of the second end point.y2 - the y-axis coordinate of the second end point.x3 - the x-axis coordinate of the final end point.y3 - the y-axis coordinate of the final end point.public int getNumberOfSegments()
Return number of segments in this path.
public short getSegment(int cmdIndex)
throws DOMException
Returns segment command by zero-based command index. Returns one of MOVE_TO, LINE_TO, CURVE_TO, QUAD_TO or CLOSE.
cmdIndex - the command index for the segment command to retrieve.DOMException - with error code INDEX_SIZE_ERR if segment index out of bounds.
public float getSegmentParam(int cmdIndex,
int paramIndex)
throws DOMException
Returns segment parameter by zero-based command index and zero-based parameter index.
cmdIndex - the command index for the segment parameter to retrieve.paramIndex - the parameter index for the segment parameter to retrieve.DOMException - with error code INDEX_SIZE_ERR if segment index out
of bounds or param index out of bounds for this segment's type.
public void lineTo(float x,
float y)
Appends 'L' (absolute line) segment to the path with the specified coordinates.
x - the x-axis coordinate of the specified point.y - the y-axis coordinate of the specified point.
public void moveTo(float x,
float y)
Appends 'M' (absolute move) segment to the path with the specified coordinates.
x - the x-axis coordinate for the specified point.y - the y-axis coordinate for the specified point.
public void quadTo(float x1,
float y1,
float x2,
float y2)
Appends 'Q' (absolute quadratic curve) segment to the path.
x1 - the x-axis coordinate of the first control point.y1 - the y-axis coordinate of the first control point.x2 - the x-axis coordinate of the final end point.y2 - the y-axis coordinate of the final end point.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.