|
Eclipse Remote Application Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.graphics.Resource org.eclipse.swt.graphics.Path
public class Path
Instances of this class represent paths through the two-dimensional coordinate system. Paths do not have to be continuous, and can be described using lines, rectangles, arcs, cubic or quadratic bezier curves, glyphs, or other paths.
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.
Constructor Summary | |
---|---|
Path(Device device)
Constructs a new empty Path. |
|
Path(Device device,
PathData data)
Constructs a new Path with the specified PathData. |
Method Summary | |
---|---|
void |
addPath(Path path)
Adds to the receiver the path described by the parameter. |
void |
addRectangle(float x,
float y,
float width,
float height)
Adds to the receiver the rectangle specified by x, y, width and height. |
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. |
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. |
void |
getCurrentPoint(float[] point)
Replaces the first two elements in the parameter with values that describe the current point of the path. |
PathData |
getPathData()
Returns a device independent representation of the receiver. |
void |
lineTo(float x,
float y)
Adds to the receiver a line from the current point to the point specified by (x, y). |
void |
moveTo(float x,
float y)
Sets the current point of the receiver to the point specified by (x, y). |
void |
quadTo(float cx,
float cy,
float x,
float y)
Adds to the receiver a quadratic curve based on the parameters. |
Methods inherited from class org.eclipse.swt.graphics.Resource |
---|
dispose, getDevice, isDisposed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Path(Device device)
This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms.
device
- the device on which to allocate the path
java.lang.IllegalArgumentException
- SWTException
- SWTError
- Resource.dispose()
public Path(Device device, PathData data)
This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms.
device
- the device on which to allocate the pathdata
- the data for the path
java.lang.IllegalArgumentException
- SWTException
- SWTError
- Resource.dispose()
Method Detail |
---|
public void addPath(Path path)
path
- the path to add to the receiver
java.lang.IllegalArgumentException
- SWTException
- public void addRectangle(float x, float y, float width, float height)
x
- the x coordinate of the rectangle to addy
- the y coordinate of the rectangle to addwidth
- the width of the rectangle to addheight
- the height of the rectangle to add
SWTException
- public void moveTo(float x, float y)
x
- the x coordinate of the new end pointy
- the y coordinate of the new end point
SWTException
- public void lineTo(float x, float y)
x
- the x coordinate of the end of the line to addy
- the y coordinate of the end of the line to add
SWTException
- public void quadTo(float cx, float cy, float x, float y)
cx
- the x coordinate of the control point of the splinecy
- the y coordinate of the control point of the splinex
- the x coordinate of the end point of the spliney
- the y coordinate of the end point of the spline
SWTException
- public void cubicTo(float cx1, float cy1, float cx2, float cy2, float x, float y)
cx1
- the x coordinate of the first control point of the splinecy1
- the y coordinate of the first control of the splinecx2
- the x coordinate of the second control of the splinecy2
- the y coordinate of the second control of the splinex
- the x coordinate of the end point of the spliney
- the y coordinate of the end point of the spline
SWTException
- public void close()
SWTException
- public PathData getPathData()
SWTException
- PathData
public void getCurrentPoint(float[] point)
point
- the array to hold the result
java.lang.IllegalArgumentException
- SWTException
-
|
Eclipse Remote Application Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) EclipseSource and others 2002, 2013. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0