Application code must explicitly invoke the Path.dispose()
method to release the operating system resources managed by each instance
when those instances are no longer required.
This class requires the operating system's advanced graphics subsystem which may not be available on some platforms.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| public long | handle
the OS resource for the Path (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addArc(float
the x coordinate of the upper-left corner of the arc x, float the y coordinate of the upper-left corner of the arc y, float the width of the arc width, float the height of the arc height, float the beginning angle startAngle, float the angular extent of the arc, relative to the start angle arcAngle)Adds to the receiver a circular or elliptical arc that lies within the specified rectangular area. |
| pack-priv void | |
| public void | |
| public void | addRectangle(float
the x coordinate of the rectangle to add x, float the y coordinate of the rectangle to add y, float the width of the rectangle to add width, float the height of the rectangle to add height)Adds to the receiver the rectangle specified by x, y, width and height. |
| pack-priv void | |
| public void | |
| pack-priv void | |
| public void | close()
Closes the current sub path by adding to the receiver a line from the current point of the path back to the starting point of the sub path. |
| public boolean | Returns: true if the path contains the point and false otherwisethe x coordinate of the point to test for containment x, float the y coordinate of the point to test for containment y, GC the GC to use when testing for containment gc, boolean controls whether to check the outline or contained area of the path outline)Returns |
| pack-priv boolean | |
| public void | cubicTo(float
the x coordinate of the first control point of the spline cx1, float the y coordinate of the first control of the spline cy1, float the x coordinate of the second control of the spline cx2, float the y coordinate of the second control of the spline cy2, float the x coordinate of the end point of the spline x, float the y coordinate of the end point of the spline y)Adds to the receiver a cubic bezier curve based on the parameters. |
| pack-priv void | |
| pack-priv void | |
| public void | getBounds(float[]
the array to hold the result bounds)Replaces the first four elements in the parameter with values that describe the smallest rectangle that will completely contain the receiver (i.e. the bounding box). |
| pack-priv void | |
| public void | getCurrentPoint(float[]
the array to hold the result point)Replaces the first two elements in the parameter with values that describe the current point of the path. |
| pack-priv void | |
| public PathData | Returns: the PathData for the receiverReturns a device independent representation of the receiver. |
| pack-priv PathData | |
| pack-priv void | |
| public boolean | Returns: true when the Path is disposed, and false otherwiseImplements abstract org. true if the Path has been disposed,
and false otherwise.
|
| public void | lineTo(float
the x coordinate of the end of the line to add x, float the y coordinate of the end of the line to add y)Adds to the receiver a line from the current point to the point specified by (x, y). |
| pack-priv void | |
| public void | moveTo(float
the x coordinate of the new end point x, float the y coordinate of the new end point y)Sets the current point of the receiver to the point specified by (x, y). |
| pack-priv void | |
| public void | quadTo(float
the x coordinate of the control point of the spline cx, float the y coordinate of the control point of the spline cy, float the x coordinate of the end point of the spline x, float the y coordinate of the end point of the spline y)Adds to the receiver a quadratic curve based on the parameters. |
| pack-priv void | |
| public String | Returns: a string representation of the receiverOverrides java. |
| closed | back to summary |
|---|---|
| pack-priv boolean closed | |
| handle | back to summary |
|---|---|
| public long handle the OS resource for the Path (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms and should never be accessed from application code. | |
| moved | back to summary |
|---|---|
| pack-priv boolean moved | |
| Path | back to summary |
|---|---|
| public Path(Device device) Constructs a new empty Path. This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms. You must dispose the path when it is no longer required.
| |
| Path | back to summary |
|---|---|
| public Path(Device device, Path path, float flatness) Constructs a new Path that is a copy of This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms. You must dispose the path when it is no longer required.
| |
| Path | back to summary |
|---|---|
| public Path(Device device, PathData data) Constructs a new Path with the specified PathData. This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms. You must dispose the path when it is no longer required.
| |
| addArc | back to summary |
|---|---|
| public void addArc(float x, float y, float width, float height, float startAngle, float arcAngle) Adds to the receiver a circular or elliptical arc that lies within the specified rectangular area.
The resulting arc begins at
The center of the arc is the center of the rectangle whose origin
is (
The resulting arc covers an area
| |
| addArcInPixels | back to summary |
|---|---|
| pack-priv void addArcInPixels(float x, float y, float width, float height, float startAngle, float arcAngle) | |
| addPath | back to summary |
|---|---|
| public void addPath(Path path) Adds to the receiver the path described by the parameter.
| |
| addRectangle | back to summary |
|---|---|
| public void addRectangle(float x, float y, float width, float height) Adds to the receiver the rectangle specified by x, y, width and height.
| |
| addRectangleInPixels | back to summary |
|---|---|
| pack-priv void addRectangleInPixels(float x, float y, float width, float height) | |
| addString | back to summary |
|---|---|
| public void addString(String string, float x, float y, Font font) Adds to the receiver the pattern of glyphs generated by drawing the given string using the given font starting at the point (x, y).
| |
| addStringInPixels | back to summary |
|---|---|
| pack-priv void addStringInPixels(String string, float x, float y, Font font) | |
| close | back to summary |
|---|---|
| public void close() Closes the current sub path by adding to the receiver a line from the current point of the path back to the starting point of the sub path.
| |
| contains | back to summary |
|---|---|
| public boolean contains(float x, float y, GC gc, boolean outline) Returns
If outline is
| |
| containsInPixels | back to summary |
|---|---|
| pack-priv boolean containsInPixels(float x, float y, GC gc, boolean outline) | |
| cubicTo | back to summary |
|---|---|
| public void cubicTo(float cx1, float cy1, float cx2, float cy2, float x, float y) Adds to the receiver a cubic bezier curve based on the parameters.
| |
| cubicToInPixels | back to summary |
|---|---|
| pack-priv void cubicToInPixels(float cx1, float cy1, float cx2, float cy2, float x, float y) | |
| destroy | back to summary |
|---|---|
| pack-priv void destroy() Overrides org.
| |
| getBounds | back to summary |
|---|---|
| public void getBounds(float[] bounds) Replaces the first four elements in the parameter with values that describe the smallest rectangle that will completely contain the receiver (i.e. the bounding box).
| |
| getBoundsInPixels | back to summary |
|---|---|
| pack-priv void getBoundsInPixels(float[] bounds) | |
| getCurrentPoint | back to summary |
|---|---|
| public void getCurrentPoint(float[] point) Replaces the first two elements in the parameter with values that describe the current point of the path.
| |
| getCurrentPointInPixels | back to summary |
|---|---|
| pack-priv void getCurrentPointInPixels(float[] point) | |
| getPathData | back to summary |
|---|---|
| public PathData getPathData() Returns a device independent representation of the receiver.
| |
| getPathDataInPixels | back to summary |
|---|---|
| pack-priv PathData getPathDataInPixels() | |
| init | back to summary |
|---|---|
| pack-priv void init(PathData data) | |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements abstract org. Returns
This method gets the dispose state for the Path.
When a Path has been disposed, it is an error to
invoke any other method (except
| |
| lineTo | back to summary |
|---|---|
| public void lineTo(float x, float y) Adds to the receiver a line from the current point to the point specified by (x, y).
| |
| lineToInPixels | back to summary |
|---|---|
| pack-priv void lineToInPixels(float x, float y) | |
| moveTo | back to summary |
|---|---|
| public void moveTo(float x, float y) Sets the current point of the receiver to the point specified by (x, y). Note that this starts a new sub path.
| |
| moveToInPixels | back to summary |
|---|---|
| pack-priv void moveToInPixels(float x, float y) | |
| quadTo | back to summary |
|---|---|
| public void quadTo(float cx, float cy, float x, float y) Adds to the receiver a quadratic curve based on the parameters.
| |
| quadToInPixels | back to summary |
|---|---|
| pack-priv void quadToInPixels(float cx, float cy, float x, float y) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string containing a concise, human-readable description of the receiver. | |