public abstract class ALcdGXYPen extends Object implements ILcdGXYPen, ILcdCloneable
ILcdGXYPen
methods. It
also provides extra functionality which is described below.create(com.luciad.model.ILcdModelReference)
for default factory methods.
An ALcdGXYPen
allows to draw curves adaptively. Related methods are:
appendParameterizedPath
appendParameterizedPath
setMinRecursionDepth
getMinRecursionDepth
setMaxRecursionDepth
getMaxRecursionDepth
setViewDistanceThreshold
getViewDistanceThreshold
setWorldDistanceThreshold
getWorldDistanceThreshold
setAngleThreshold
getAngleThreshold
Extra line drawing methods are added as well:
An ALcdGXYPen
provides additional methods to use and/or manipulate the internal path:
Three extra methods are added related to picking objects:
An ALcdGXYPen
also provides additional methods to draw hot points:
Finally, several methods are provided which are only approximate but fast implementations of some of the
methods of the ILcdGXYPen
interface. This so-called "Cartesian mode" involves drawing straight lines, planar arcs, etc. Related methods are:
appendCartesianLineTo
appendCartesianLineTo
appendCartesianPolyline
appendCartesianPolyline
appendCartesianArc
appendCartesianArc
drawCartesianArc
cartesianModelDistance
isCartesianLineTouched
isCartesianArcTouched
This class is subject to change.
Modifier and Type | Class and Description |
---|---|
static class |
ALcdGXYPen.Quality
Indicates the rendering quality of the pen.
|
Modifier and Type | Field and Description |
---|---|
static int |
BEGIN_ARROW_TYPE
constant representing an arrow at the start of the line
|
static int |
END_AND_BEGIN_ARROW_TYPE
constant representing an arrow at both end points of the line
|
static int |
END_ARROW_TYPE
constant representing an arrow at the end of the line
|
protected ILcdAWTPath |
fAccumulatedAWTPath
an ILcdAWTPath used to accumulate a path
|
protected Color |
fHotPointColor
the current color of hot points
|
protected int |
fHotPointShape
the hot point shape type
|
protected int |
fHotPointSize
the current size of hot points in screen pixels
|
protected TLcdXYZPoint |
fLastModelPoint
the model coordinates of the current position
|
protected TLcdXYPoint |
fLastViewPoint
the view coordinates of the current position
|
protected TLcdXYPoint |
fLastWorldPoint
the world coordinates of the current position
|
protected boolean |
fValidMove
Indicates whether the most recent attempt to move the current position was valid, that is to say
whether the current position has valid model and world coordinates.
|
static int |
MIDDLE_BOTH_ARROW_TYPE
constant representing an arrow in the middle of the line pointing to both the start and the end of the line
|
static int |
MIDDLE_TO_BEGIN_ARROW_TYPE
constant representing an arrow in the middle of the line pointing to the start of the line
|
static int |
MIDDLE_TO_END_ARROW_TYPE
constant representing an arrow in the middle of the line pointing to the end of the line
|
CIRCLE, FILLED_CIRCLE, FILLED_SQUARE, HORIZONTAL_CROSS, VERTICAL_CROSS
Constructor and Description |
---|
ALcdGXYPen()
Default constructor.
|
ALcdGXYPen(ALcdGXYPen aGXYPen)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accumulateArc(ILcdPoint aCenter,
double aA,
double aB,
double aRotAngle,
double aStartAngle,
double aArcAngle,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Accumulates a polyline approximation of the given arc to the internally stored path.
|
void |
accumulateAWTPoint(double aX,
double aY)
Accumulates the given AWT point to the internally stored path.
|
void |
accumulateHorizontalLineTo(double aDeltaX,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Accumulates a horizontal line starting from the current position to the internally stored path.
|
void |
accumulateLineTo(ILcdPoint aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Accumulates a line from the current position to the given model point to the internally stored path.
|
void |
accumulatePointList(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Accumulates a polyline to the internally stored path.
|
void |
accumulateSplit()
Accumulates a line break to the internally stored path.
|
void |
accumulateVerticalLineTo(double aDeltaY,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Accumulates a vertical line starting from the current position to the internally stored path.
|
protected void |
appendCartesianArc(ILcdPoint aCenter,
double aA,
double aB,
double aRotAngle,
double aStartAngle,
double aArcAngle,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGeneralPath aGeneralPathSFCT)
Appends a polyline approximation of the given arc to the given
ILcdGeneralPath . |
protected void |
appendCartesianArc(ILcdPoint aCenter,
double aA,
double aB,
double aRotAngle,
double aStartAngle,
double aArcAngle,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends a polyline approximation of the given arc to the given
ILcdAWTPath . |
protected void |
appendCartesianLineTo(ILcdPoint aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGeneralPath aGeneralPathSFCT)
Appends a straight line between the world coordinates of the current position and the given model
point to the given
ILcdGeneralPath . |
protected void |
appendCartesianLineTo(ILcdPoint aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends a straight line between the AWT coordinates of the current position and the given model
point to the given
ILcdAWTPath . |
protected void |
appendCartesianPolyline(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGeneralPath aGeneralPathSFCT)
Appends a polyline to the given
ILcdGeneralPath . |
protected void |
appendCartesianPolyline(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends a polyline to the given
ILcdAWTPath . |
void |
appendCurve(ILcdCurve aCurve,
boolean aIncludingStartPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGeneralPath aGeneralPathSFCT)
Appends a polyline approximation of a curve to the given
ILcdGeneralPath . |
void |
appendCurve(ILcdCurve aCurve,
boolean aIncludingStartPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends a polyline approximation of a curve to the given
ILcdAWTPath . |
void |
appendGeneralPath(ILcdGeneralPath aGeneralPath,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends the given
ILcdGeneralPath to the given ILcdAWTPath . |
void |
appendParameterizedPath(ILcdParameterizedPath aParameterizedPath,
boolean aIncludingStartPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGeneralPath aGeneralPathSFCT)
Appends a polyline approximation of a curve to the given
ILcdGeneralPath . |
void |
appendParameterizedPath(ILcdParameterizedPath aParameterizedPath,
boolean aIncludingStartPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends a polyline approximation of a curve to the given
ILcdAWTPath . |
void |
arcBoundsSFCT(ILcdPoint aCenter,
double aA,
double aB,
double aRotAngle,
double aStartAngle,
double aArcAngle,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcd2DEditableBounds aBoundsSFCT)
Calculates the bounding box in AWT coordinates of the given arc.
|
protected boolean |
AWTPathContains(ILcdAWTPath aAWTPath,
double aX,
double aY)
Checks whether the polygon, specified as an
ILcdAWTPath , encloses the given AWT point. |
void |
calculateAccumulatedAWTBounds(ILcd2DEditableBounds aBoundsSFCT)
Calculates the bounding box of the internally stored path.
|
protected double |
cartesianModelDistance(double aX1,
double aY1,
double aX2,
double aY2,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Calculates an approximation of the model distance between the two given points expressed in AWT coordinates.
|
Object |
clone()
Makes
Object.clone() public. |
boolean |
contains(ILcdPointList aPointList,
double aX,
double aY,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Checks whether the given polygon encloses the given AWT point.
|
static ALcdGXYPen |
create(ILcdModelReference aModelReference)
Creates a pen that suits the given model reference and gives fast rendering results.
|
static ALcdGXYPen |
create(ILcdModelReference aModelReference,
ALcdGXYPen.Quality aQuality)
Creates a pen that suits the given model reference and using the given rendering quality.
|
void |
drawAccumulatedPolygon(Graphics aGraphics,
boolean aEmptyAccumulated)
Draws the points stored in the internal path as a polygon.
|
void |
drawAccumulatedPolyline(Graphics aGraphics,
boolean aEmptyAccumulated)
Draws the points stored in the internal path as a polyline.
|
void |
drawArc(ILcdPoint aCenter,
double aA,
double aB,
double aRotAngle,
double aStartAngle,
double aArcAngle,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws an arc onto the given
Graphics . |
protected void |
drawCartesianArc(double aCenterX,
double aCenterY,
double aStartX,
double aStartY,
double aArcAngle,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a circular arc onto the given
Graphics . |
void |
drawHorizontalLineTo(double aDeltaX,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a horizontal line from the current position to the given model point onto the given
Graphics . |
void |
drawHotPoint(double aX,
double aY,
Graphics aGraphics)
Draws a hot point at the given AWT point.
|
void |
drawHotPoint(double aX,
double aY,
String aReference,
Graphics aGraphics)
Draws a hot point at the given AWT point and a string next to it.
|
void |
drawHotPoint(ILcdPoint aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a hot point at the given model point.
|
void |
drawHotPoint(ILcdPoint aPoint,
String aReference,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a hot point at the given model point and a string next to this point.
|
void |
drawHotPoint(Point aPoint,
Graphics aGraphics)
Deprecated.
This method is deprecated to support HiDPI displays, which requires additional
coordinate precision to accurately apply dpi scaling. The recommendation is to use
drawHotPoint(double, double, Graphics) , which uses double-precision coordinates. |
void |
drawLine(ILcdPoint aPoint1,
ILcdPoint aPoint2,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a line between the two given model points onto the given
Graphics . |
void |
drawLine(int aFromX,
int aFromY,
int aToX,
int aToY,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Deprecated.
This method is deprecated to support HiDPI displays, which requires additional
coordinate precision to accurately apply dpi scaling. The recommendation is to use
drawLine(ILcdPoint, ILcdPoint, ILcdModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation, Graphics) ,
which relies on ILcdPoint with double-precision coordinates. |
void |
drawLineTo(double aX,
double aY,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a line from the current position to the given AWT point onto the given
Graphics . |
void |
drawLineTo(ILcdPoint aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a line from the current position to the given model point onto the given
Graphics . |
void |
drawLineTo(Point aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a line from the current position to the given AWT point onto the given
Graphics . |
void |
drawLineWithArrow(ILcdPoint aPoint1,
ILcdPoint aPoint2,
int aLength,
double aAngle,
int aArrowType,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a line between the two given model points onto the given
Graphics with arrows
at either end or in the middle. |
void |
drawPolygon(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a polygon onto the given
Graphics . |
void |
drawPolyline(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a polyline onto the given
Graphics . |
void |
drawVerticalLineTo(double aDeltaY,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a vertical line from the current position to the given model point onto the given
Graphics . |
void |
emptyAccumulated()
Clears the accumulated internal path.
|
void |
fillAccumulatedPolygon(Graphics aGraphics,
boolean aEmptyAccumulated)
Draws the points stored in the internal path as a filled polygon.
|
void |
fillPolygon(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
Graphics aGraphics)
Draws a filled polygon onto the given
Graphics . |
double |
getAngleThreshold()
Returns the current angle threshold.
|
Color |
getHotPointColor()
Gets the hot point color currently used by this
ILcdGXYPen . |
ILcdIcon |
getHotPointIcon()
Gets the hot point icon currently used by this
ILcdGXYPen . |
int |
getHotPointShape()
Gets the hot point shape currently used by this
ILcdGXYPen . |
int |
getHotPointSize()
Gets the size of the shape currently representing a hot point.
|
int |
getMaxRecursionDepth()
Returns the current maximum recursion depth value of the adaptive drawing algorithm.
|
int |
getMinRecursionDepth()
Returns the current minimum recursion depth value of the adaptive drawing algorithm.
|
int |
getTouchedSegment(ILcdPointList aPointList,
boolean aAsPolygon,
double aX,
double aY,
boolean aIncludeHotPoints,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Gets the index of the line segment of the given
ILcdPointList which is touched by
the given AWT point. |
double |
getViewDistanceThreshold()
Returns the current threshold on the distance between two consecutive points (view coordinates)
of the polyline approximation.
|
double |
getWorldDistanceThreshold()
Returns the current threshold on the distance between two consecutive points (in world coordinates)
of the polyline approximation.
|
int |
getX()
Gets the AWT x coordinate of the current position of this
ILcdGXYPen . |
double |
getXAsDouble()
Gets the AWT x coordinate of the current position of this
ILcdGXYPen . |
int |
getY()
Gets the AWT y coordinate of the current position of this
ILcdGXYPen . |
double |
getYAsDouble()
Gets the AWT y coordinate of the current position of this
ILcdGXYPen . |
boolean |
isAccumulatedPolylineTouched(double aX,
double aY,
int aSensitivity)
Checks whether the given AWT point touches the internally stored path.
|
boolean |
isArcTouched(ILcdPoint aCenter,
double aA,
double aB,
double aRotAngle,
double aStartAngle,
double aArcAngle,
double aX,
double aY,
int aSensitivity,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Tests if the given arc is touched by clicking at the given AWT point taking into account the
given tolerance.
|
protected boolean |
isCartesianArcTouched(ILcdPoint aCenter,
double aA,
double aB,
double aRotAngle,
double aStartAngle,
double aArcAngle,
int aViewX,
int aViewY,
int aSensitivity,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Tests if the given arc is touched by clicking at the given AWT point taking into account the
given tolerance.
|
protected boolean |
isCartesianLineTouched(ILcdPoint aPoint1,
ILcdPoint aPoint2,
double aXView,
double aYView,
boolean aIncludeHotPoint,
int aSensitivity,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Tests if a given line is touched by clicking at the given AWT point.
|
boolean |
isHorizontalLineTouched(ILcdPoint aPoint,
double aDeltaX,
double aX,
double aY,
boolean aIncludeHotPoint,
int aSensitivity,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Tests if a given horizontal line is touched by clicking at the given AWT point.
|
boolean |
isLineTouched(ILcdPoint aPoint1,
ILcdPoint aPoint2,
double aX,
double aY,
boolean aIncludeHotPoint,
int aSensitivity,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Tests if a given line is touched by clicking at the given AWT point.
|
boolean |
isTouched(double aTargetX,
double aTargetY,
double aX,
double aY,
int aSensitivity)
Tests if the given target AWT point is touched by clicking at the given AWT point.
|
boolean |
isTouched(ILcdPoint aPoint,
double aX,
double aY,
int aSensitivity,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Tests if the given model point is touched by clicking at the given AWT point.
|
boolean |
isVerticalLineTouched(ILcdPoint aPoint,
double aDeltaY,
double aX,
double aY,
boolean aIncludeHotPoint,
int aSensitivity,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Tests if a given vertical line is touched by clicking at the given AWT point.
|
boolean |
isViewLineTouched(Point aPoint1,
Point aPoint2,
double aX,
double aY,
boolean aIncludeHotPoints,
int aSensitivity)
Tests if a given straight line is touched by clicking at the given AWT point.
|
void |
lineBoundsSFCT(ILcdPoint aPoint1,
ILcdPoint aPoint2,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcd2DEditableBounds aBoundsSFCT)
Calculates the bounding box in AWT coordinates of the line between the two given model points.
|
void |
moveTo(double aX,
double aY,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Moves the current position by setting its AWT coordinates to the given AWT point.
|
void |
moveTo(ILcdPoint aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation)
Moves the current position by setting its model coordinates to the given model point.
|
void |
moveTo(ILcdPoint aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Moves the current position by setting its model coordinates to the given model point.
|
void |
polylineBoundsSFCT(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcd2DEditableBounds aBoundsSFCT)
Calculates the bounding box in AWT coordinates of the given polyline.
|
void |
resetPosition()
Makes the current position undefined so that it is not involved in the next drawing or
append/accumulate operation.
|
void |
setAngleThreshold(double aAngleThreshold)
Sets the angle threshold.
|
void |
setHotPointColor(Color aHotPointColor)
Sets the hot point color.
|
void |
setHotPointIcon(ILcdIcon aIcon)
Sets the hot point icon.
|
void |
setHotPointShape(int aHotPointShape)
Sets the hot point shape.
|
void |
setHotPointSize(int aHotPointSize)
Sets the hot point size.
|
void |
setMaxRecursionDepth(int aMaxRecursionDepth)
Sets the maximum recursion depth of the adaptive drawing algorithm.
|
void |
setMinRecursionDepth(int aMinRecursionDepth)
Sets the minimum recursion depth of the adaptive drawing algorithm.
|
void |
setViewDistanceThreshold(double aViewDistanceThreshold)
Sets the threshold on the distance between two consecutive points (view coordinates)
of the polyline approximation.
|
void |
setWorldDistanceThreshold(double aWorldDistanceThreshold)
Sets the threshold on the distance between two consecutive points (in world coordinates)
of the polyline approximation.
|
void |
translateOf(double aDeltaX,
double aDeltaY,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Translates the AWT coordinates of the current position.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendArc, appendArc, appendHorizontalLineTo, appendHorizontalLineTo, appendLineTo, appendLineTo, appendPointList, appendPointList, appendVerticalLineTo, appendVerticalLineTo, drawArc, modelDistance
protected transient TLcdXYPoint fLastViewPoint
protected transient TLcdXYPoint fLastWorldPoint
protected transient TLcdXYZPoint fLastModelPoint
protected transient boolean fValidMove
protected transient ILcdAWTPath fAccumulatedAWTPath
protected Color fHotPointColor
protected int fHotPointSize
protected int fHotPointShape
public static final int END_ARROW_TYPE
public static final int MIDDLE_TO_END_ARROW_TYPE
public static final int MIDDLE_TO_BEGIN_ARROW_TYPE
public static final int MIDDLE_BOTH_ARROW_TYPE
public static final int BEGIN_ARROW_TYPE
public static final int END_AND_BEGIN_ARROW_TYPE
public ALcdGXYPen()
public ALcdGXYPen(ALcdGXYPen aGXYPen)
aGXYPen
- the ALcdGXYPen to be copiedpublic static ALcdGXYPen create(ILcdModelReference aModelReference)
aModelReference
- the model reference that the pen should work with. Never null.create(ILcdModelReference, Quality)
public static ALcdGXYPen create(ILcdModelReference aModelReference, ALcdGXYPen.Quality aQuality)
aModelReference
- the model reference that the pen should work with. Never null.aQuality
- the rendering quality to use. Never null.public final int getX()
ILcdGXYPen
ILcdGXYPen
.getX
in interface ILcdGXYPen
ILcdGXYPen
public final int getY()
ILcdGXYPen
ILcdGXYPen
.getY
in interface ILcdGXYPen
ILcdGXYPen
public final double getXAsDouble()
ILcdGXYPen
ILcdGXYPen
.getXAsDouble
in interface ILcdGXYPen
ILcdGXYPen
public final double getYAsDouble()
ILcdGXYPen
ILcdGXYPen
.getYAsDouble
in interface ILcdGXYPen
ILcdGXYPen
public final void moveTo(ILcdPoint aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
Setting the current position is only required - and should therefore only be used -
to define the start point of a line. This is necessary in combination with one of the
drawLineTo
, drawHorizontalLineTo
, or drawVerticalLineTo
methods or in case one adds a line to an empty (sub)path with one of the appendLineTo
or accumulateLineTo
methods.
Note that this method does not create a line break.
moveTo
in interface ILcdGXYPen
aPoint
- the model point to which the current position is movedaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesTLcdOutOfBoundsException
- If the given point is outside the valid area of the
given ILcdModelXYWorldTransformation
.public final void moveTo(ILcdPoint aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
.
Setting the current position is only required - and should therefore only be used -
to define the start point of a line. This is necessary in combination with one of the
drawLineTo
, drawHorizontalLineTo
, or drawVerticalLineTo
methods or in case one adds a line to an empty (sub)path with one of the appendLineTo
or accumulateLineTo
methods.
Note that this method does not create a line break.
moveTo
in interface ILcdGXYPen
aPoint
- the model point to which the current position is movedaModelXYWorldTransformation
- the transformation between model and world coordinatesTLcdOutOfBoundsException
- If the given point is outside the valid area of the
given ILcdModelXYWorldTransformation
.public final void moveTo(double aX, double aY, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
Setting the current position is only required - and should therefore only be used -
to define the start point of a line. This is necessary in combination with one of the
drawLineTo
, drawHorizontalLineTo
, or drawVerticalLineTo
methods or in case one adds a line to an empty (sub)path with one of the appendLineTo
or accumulateLineTo
methods.
Note that this method does not create a line break.
moveTo
in interface ILcdGXYPen
aX
- the x coordinate of the AWT point to which the current position is movedaY
- the y coordinate of the AWT point to which the current position is movedaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesTLcdOutOfBoundsException
- If the given point is outside the valid area of the
given ILcdModelXYWorldTransformation
.public void translateOf(double aDeltaX, double aDeltaY, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
Setting the current position is only required - and should therefore only be used -
to define the start point of a line. This is necessary in combination with one of the
drawLineTo
, drawHorizontalLineTo
, or drawVerticalLineTo
methods or in case one adds a line to an empty (sub)path with one of the appendLineTo
or accumulateLineTo
methods.
Note that this method does not create a line break.
translateOf
in interface ILcdGXYPen
aDeltaX
- the amount by which the AWT x coordinate of the current position is translatedaDeltaY
- the amount by which the AWT y coordinate of the current position is translatedaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesTLcdOutOfBoundsException
- If the translated point is outside the valid area of the
given ILcdModelXYWorldTransformation
public void resetPosition()
ILcdGXYPen
resetPosition
in interface ILcdGXYPen
public int getMinRecursionDepth()
appendParameterizedPath
,
appendParameterizedPath
public void setMinRecursionDepth(int aMinRecursionDepth)
aMinRecursionDepth
- the minimum recursion depthappendParameterizedPath
,
appendParameterizedPath
public int getMaxRecursionDepth()
appendParameterizedPath
,
appendParameterizedPath
public void setMaxRecursionDepth(int aMaxRecursionDepth)
aMaxRecursionDepth
- the maximum recursion depthappendParameterizedPath
,
appendParameterizedPath
public double getViewDistanceThreshold()
ILcdAWTPath
.appendParameterizedPath
public void setViewDistanceThreshold(double aViewDistanceThreshold)
ILcdAWTPath
.
The default is 6 pixels.aViewDistanceThreshold
- the threshold on the distance to be used by the adaptive drawing algorithmappendParameterizedPath
public double getWorldDistanceThreshold()
ILcdGeneralPath
.appendParameterizedPath
public void setWorldDistanceThreshold(double aWorldDistanceThreshold)
ILcdGeneralPath
.
The default is 1000.aWorldDistanceThreshold
- the threshold on the world distance to be used by the adaptive drawing algorithmappendParameterizedPath
public double getAngleThreshold()
ILcdAWTPath
or an ILcdGeneralPath
.
The angle corresponding to this threshold measures how much two consecutive line segments of the polyline
approximation deviate from being parallel.appendParameterizedPath
,
appendParameterizedPath
public void setAngleThreshold(double aAngleThreshold)
ILcdAWTPath
or an
ILcdGeneralPath
. Its value should be between 0 and 90 degrees.
The angle corresponding to this threshold measures how much two consecutive line segments of the polyline
approximation deviate from being parallel. The default is 5 degrees.aAngleThreshold
- the threshold on the angle (expressed in degrees) to be used by the adaptive drawing algorithmIllegalArgumentException
- If the given angle threshold is outside the valid range [0,90] degrees.appendParameterizedPath
,
appendParameterizedPath
public void drawLineTo(ILcdPoint aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
Graphics
.
The given model coordinates of the end point of the line are transformed to AWT coordinates
by applying the given ILcdModelXYWorldTransformation
and
ILcdGXYViewXYWorldTransformation
.drawLineTo
in interface ILcdGXYPen
aPoint
- the end point of the line (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the line is drawnTLcdOutOfBoundsException
- Some implementations may throw an exception in case the given
end point of the line is outside the valid area of the transformation but this could be avoided
by more advanced implementations.public void drawHorizontalLineTo(double aDeltaX, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
Graphics
. This model point is obtained by translating the model x coordinate
of the current position by the given amount. The model coordinates of the end point of the line
are transformed to AWT coordinates by applying the given ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.drawHorizontalLineTo
in interface ILcdGXYPen
aDeltaX
- the amount by which the model x coordinate of the current position is translatedaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics on which the line is drawnTLcdOutOfBoundsException
- Some implementations may throw an exception in case the given
end point of the line is outside the valid area of the transformation but this could be avoided
by more advanced implementations.public void drawVerticalLineTo(double aDeltaY, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
Graphics
. This model point is obtained by translating the model y coordinate
of the current position by the given amount. The model coordinates of the end point of the line
are transformed to AWT coordinates by applying the given ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.drawVerticalLineTo
in interface ILcdGXYPen
aDeltaY
- the amount by which the model y coordinate of the current position is translatedaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics on which the line is drawnTLcdOutOfBoundsException
- Some implementations may throw an exception in case the given
end point of the line is outside the valid area of the transformation but this could be avoided
by more advanced implementations.public void drawLineTo(double aX, double aY, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
Graphics
.
The given AWT coordinates of the end point of the line are transformed to model coordinates
by applying the given ILcdModelXYWorldTransformation
and
ILcdGXYViewXYWorldTransformation
.drawLineTo
in interface ILcdGXYPen
aX
- the AWT x coordinate of the point to which a line is drawnaY
- the AWT y coordinate of the point to which a line is drawnaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics on which the line is drawnTLcdOutOfBoundsException
- Some implementations may throw an exception in case the given
end point of the line is outside the valid area of the transformation but this could be avoided
by more advanced implementations.public void drawLineTo(Point aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
Graphics
.
The given AWT coordinates of the end point of the line are transformed to model coordinates
by applying the given ILcdModelXYWorldTransformation
and
ILcdGXYViewXYWorldTransformation
.aPoint
- the point (expressed in AWT coordinates) to which a line is drawnaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics on which the line is drawnTLcdOutOfBoundsException
- The current implementation does not throw a TLcdOutOfBoundsException
if the end point of the line is outside the valid area of the transformation.public void accumulateSplit()
public void accumulateAWTPoint(double aX, double aY)
aX
- the x coordinate of the AWT pointaY
- the y coordinate of the AWT pointpublic boolean isAccumulatedPolylineTouched(double aX, double aY, int aSensitivity)
aX
- the x coordinate of the AWT pointaY
- the y coordinate of the AWT pointaSensitivity
- the allowed tolerance expressed in pixelspublic void calculateAccumulatedAWTBounds(ILcd2DEditableBounds aBoundsSFCT) throws TLcdNoBoundsException
aBoundsSFCT
- the bounding box of the internally stored path on completion of the methodTLcdNoBoundsException
- If the object does not have bounds.public void emptyAccumulated()
ILcdGXYPen
public void accumulateLineTo(ILcdPoint aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and
ILcdGXYViewXYWorldTransformation
.
Note that nothing is painted yet.
accumulateLineTo
in interface ILcdGXYPen
aPoint
- the end point (specified in model coordinates) of the lineaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesTLcdOutOfBoundsException
- Some implementations may throw an exception in case the given
model point is outside the valid area of the transformation but this could be avoided by more
advanced implementations.ILcdGXYPen.drawAccumulatedPolyline(java.awt.Graphics, boolean)
,
ILcdGXYPen.drawAccumulatedPolygon(java.awt.Graphics, boolean)
,
ILcdGXYPen.fillAccumulatedPolygon(java.awt.Graphics, boolean)
public void accumulateHorizontalLineTo(double aDeltaX, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
Note that nothing is painted yet.
accumulateHorizontalLineTo
in interface ILcdGXYPen
aDeltaX
- the amount by which the model x coordinate of the current position is translatedaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesTLcdOutOfBoundsException
- Some implementations may throw an exception in case the end point
of the line is outside the valid area of the transformation but this could be avoided by more
advanced implementations.public void accumulateVerticalLineTo(double aDeltaY, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
Note that nothing is painted yet.
accumulateVerticalLineTo
in interface ILcdGXYPen
aDeltaY
- the amount by which the model y coordinate of the current position is translatedaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesTLcdOutOfBoundsException
- Some implementations may throw an exception in case the end point
of the line is outside the valid area of the transformation but this could be avoided by more
advanced implementations.public void accumulatePointList(ILcdPointList aPointList, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdPointList
of which the points are specified in
model coordinates. These model coordinates are transformed to AWT coordinates by means of the given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
Note that nothing is painted yet.
accumulatePointList
in interface ILcdGXYPen
aPointList
- the point list (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesTLcdOutOfBoundsException
- Some implementations may throw an exception in case one of the points
of the polyline is outside the valid area of the transformation but this could be avoided by more
advanced implementations.ILcdGXYPen.drawAccumulatedPolyline(java.awt.Graphics, boolean)
,
ILcdGXYPen.drawAccumulatedPolygon(java.awt.Graphics, boolean)
,
ILcdGXYPen.fillAccumulatedPolygon(java.awt.Graphics, boolean)
public void accumulateArc(ILcdPoint aCenter, double aA, double aB, double aRotAngle, double aStartAngle, double aArcAngle, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
are used to transform model coordinates to AWT coordinates.
Note that nothing is painted yet.
accumulateArc
in interface ILcdGXYPen
aCenter
- the center of the ellipse (specified in model coordinates)aA
- the semi-major axis of the ellipseaB
- the semi-minor axis of the ellipseaRotAngle
- the rotation angle of the major axis of the ellipse (expressed in degrees).
Positive angles are measured counter-clockwise from the line at 3 o'clock.aStartAngle
- the start angle of the arc (expressed in degrees). Positive angles are measured
counter-clockwise from the line at 3 o'clock.aArcAngle
- the span of the arc (expressed in degrees), increasing counterclockwise from
the start angleaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesTLcdOutOfBoundsException
- Some implementations may throw an exception in case the center
of the ellipse and/or one of the points of the polyline approximation to the arc are outside
the valid area of the transformation but this could be avoided by more advanced implementations.ILcdGXYPen.drawAccumulatedPolyline(java.awt.Graphics, boolean)
,
ILcdGXYPen.drawAccumulatedPolygon(java.awt.Graphics, boolean)
,
ILcdGXYPen.fillAccumulatedPolygon(java.awt.Graphics, boolean)
,
ILcdGXYPen.drawArc(com.luciad.shape.ILcdPoint, double, double, double, double, double, com.luciad.transformation.ILcdModelXYWorldTransformation, com.luciad.view.gxy.ILcdGXYViewXYWorldTransformation, java.awt.Graphics)
,
ILcdArc
public void drawAccumulatedPolyline(Graphics aGraphics, boolean aEmptyAccumulated)
ILcdGXYPen
aEmptyAccumulated
is true
, the internal path is cleared after the
drawing operation.drawAccumulatedPolyline
in interface ILcdGXYPen
aGraphics
- the Graphics
onto which the polyline is drawnaEmptyAccumulated
- boolean indicating whether the internal path should be clearedpublic void drawAccumulatedPolygon(Graphics aGraphics, boolean aEmptyAccumulated)
ILcdGXYPen
aEmptyAccumulated
is true
, the internal path is cleared after the
drawing operation.drawAccumulatedPolygon
in interface ILcdGXYPen
aGraphics
- the Graphics
onto which the polyline is drawnaEmptyAccumulated
- boolean indicating whether the internal path should be clearedpublic void fillAccumulatedPolygon(Graphics aGraphics, boolean aEmptyAccumulated)
ILcdGXYPen
aEmptyAccumulated
is true
, the internal path is cleared after the
drawing operation.fillAccumulatedPolygon
in interface ILcdGXYPen
aGraphics
- the Graphics
onto which the polyline is drawnaEmptyAccumulated
- boolean indicating whether the internal path should be clearedpublic void appendGeneralPath(ILcdGeneralPath aGeneralPath, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdGXYPen
ILcdGeneralPath
to the given ILcdAWTPath
.
The world coordinates of the points stored in the given ILcdGeneralPath
are
transformed to AWT coordinates by means of the given ILcdGXYViewXYWorldTransformation
.
If consecutive world points map to the same AWT point, the AWT path may be simplified in order to
reduce memory requirements and improve the performance of further operations.appendGeneralPath
in interface ILcdGXYPen
aGeneralPath
- the general path which is appended to the given AWT pathaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaAWTPathSFCT
- the AWT path to which the given general path is appended@Deprecated public void drawLine(int aFromX, int aFromY, int aToX, int aToY, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
drawLine(ILcdPoint, ILcdPoint, ILcdModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation, Graphics)
,
which relies on ILcdPoint
with double-precision coordinates.Graphics
.
The AWT coordinates of the end points of the line are transformed to model coordinates
by applying the given ILcdModelXYWorldTransformation
and
ILcdGXYViewXYWorldTransformation
.aFromX
- the AWT x-coordinate of the start point of the lineaFromY
- the AWT y-coordinate of the start point of the lineaToX
- the AWT x-coordinate of the end point of the lineaToY
- the AWT y-coordinate of the end point of the lineaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the line is drawnTLcdOutOfBoundsException
- The current implementation does not throw a TLcdOutOfBoundsException
if one of the end points of the line is outside the valid area of the transformation.public void drawLine(ILcdPoint aPoint1, ILcdPoint aPoint2, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
Graphics
.
The model coordinates of the end points of the line are transformed to AWT coordinates
by applying the given ILcdModelXYWorldTransformation
and
ILcdGXYViewXYWorldTransformation
.drawLine
in interface ILcdGXYPen
aPoint1
- the start point of the line (specified in model coordinates)aPoint2
- the end point of the line (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the line is drawnTLcdOutOfBoundsException
- Some implementations may throw an exception in case one of the
given end points of the line is outside the valid area of the transformation but this could be
avoided by more advanced implementations.public void drawLineWithArrow(ILcdPoint aPoint1, ILcdPoint aPoint2, int aLength, double aAngle, int aArrowType, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
Graphics
with arrows
at either end or in the middle.
The model coordinates of the end points of the line are transformed to AWT coordinates
by applying the given ILcdModelXYWorldTransformation
and
ILcdGXYViewXYWorldTransformation
.aPoint1
- the start point of the line, expressed in model coordinatesaPoint2
- the end point of the line, expressed in model coordinatesaLength
- length of the arrowhead, expressed in pixelsaAngle
- angle of the arrowhead, expressed in degreesaArrowType
- arrow type (END_ARROW_TYPE, MIDDLE_TO_END_ARROW_TYPE, MIDDLE_TO_BEGIN_ARROW_TYPE,
MIDDLE_BOTH_ARROW_TYPE, BEGIN_ARROW_TYPE, END_AND_BEGIN_ARROW_TYPE)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the line is drawnTLcdOutOfBoundsException
- The current implementation does not throw a TLcdOutOfBoundsException
if one of the end points of the line is outside the valid area of the transformation.public void drawPolyline(ILcdPointList aPointList, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
Graphics
.
The polyline is given as an ILcdPointList
of which the points are specified in
model coordinates. These model coordinates are transformed to AWT coordinates by means of the
given ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.drawPolyline
in interface ILcdGXYPen
aPointList
- the point list (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the polyline is drawnTLcdOutOfBoundsException
- Some implementations may throw an exception in case one of
the points of the polyline is outside the valid area of the transformation but this could be
avoided by more advanced implementations.public void drawPolygon(ILcdPointList aPointList, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
Graphics
.
The polygon is given as an ILcdPointList
of which the points are specified in
model coordinates. These model coordinates are transformed to AWT coordinates by means of the
given ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.drawPolygon
in interface ILcdGXYPen
aPointList
- the point list (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the polygon is drawnTLcdOutOfBoundsException
- Some implementations may throw an exception in case one of
the points of the polygon is outside the valid area of the transformation but this could be
avoided by more advanced implementations.public void fillPolygon(ILcdPointList aPointList, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
Graphics
.
The polygon is given as an ILcdPointList
of which the points are specified in
model coordinates. These model coordinates are transformed to AWT coordinates by means of the
given ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.fillPolygon
in interface ILcdGXYPen
aPointList
- the point list (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the polygon is drawnTLcdOutOfBoundsException
- Some implementations may throw an exception in case one of
the points of the polygon is outside the valid area of the transformation but this could be
avoided by more advanced implementations.public void drawArc(ILcdPoint aCenter, double aA, double aB, double aRotAngle, double aStartAngle, double aArcAngle, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
Graphics
.
The arc is specified as a segment of the circumference of an ellipse. The given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
are used to transform model coordinates to AWT coordinates.drawArc
in interface ILcdGXYPen
aCenter
- the center of the ellipse (specified in model coordinates)aA
- the semi-major axis of the ellipseaB
- the semi-minor axis of the ellipseaRotAngle
- the rotation angle of the major axis of the ellipse (expressed in degrees).
Positive angles are measured counter-clockwise from the line at 3 o'clock.aStartAngle
- the start angle of the arc (expressed in degrees). Positive angles are measured
counter-clockwise from the line at 3 o'clock.aArcAngle
- the span of the arc (expressed in degrees), increasing counterclockwise from
the start angleaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the arc is drawnTLcdOutOfBoundsException
- Some implementations may throw an exception in case the center
of the ellipse and/or one of the points of the arc is outside the valid area of the transformation
but this could be avoided by more advanced implementations.ILcdArc
public void lineBoundsSFCT(ILcdPoint aPoint1, ILcdPoint aPoint2, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcd2DEditableBounds aBoundsSFCT) throws TLcdNoBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.lineBoundsSFCT
in interface ILcdGXYPen
aPoint1
- the start point of the line (specified in model coordinates)aPoint2
- the end point of the line (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaBoundsSFCT
- the bounding box in AWT coordinates of the given line on completion of the methodTLcdNoBoundsException
- If the line is outside the valid area of the
given ILcdModelXYWorldTransformation
.public void polylineBoundsSFCT(ILcdPointList aPointList, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcd2DEditableBounds aBoundsSFCT) throws TLcdNoBoundsException
ILcdGXYPen
ILcdPointList
of which the points are specified in
model coordinates. These model coordinates are transformed to AWT coordinates by means of the given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.polylineBoundsSFCT
in interface ILcdGXYPen
aPointList
- the point list (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaBoundsSFCT
- the bounding box in AWT coordinates of the given polyline on completion of the methodTLcdNoBoundsException
- If the polyline is outside the valid area
of the given ILcdModelXYWorldTransformation
.public void arcBoundsSFCT(ILcdPoint aCenter, double aA, double aB, double aRotAngle, double aStartAngle, double aArcAngle, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcd2DEditableBounds aBoundsSFCT) throws TLcdNoBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
are used to transform model coordinates to AWT coordinates.arcBoundsSFCT
in interface ILcdGXYPen
aCenter
- the center of the ellipse (specified in model coordinates)aA
- the semi-major axis of the ellipseaB
- the semi-minor axis of the ellipseaRotAngle
- the rotation angle of the major axis of the ellipse (expressed in degrees).
Positive angles are measured counter-clockwise from the line at 3 o'clock.aStartAngle
- the start angle of the arc (expressed in degrees). Positive angles are measured
counter-clockwise from the line at 3 o'clock.aArcAngle
- the span of the arc (expressed in degrees), increasing counterclockwise from
the start angleaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaBoundsSFCT
- the bounding box in AWT coordinates of the given arc on completion of the methodTLcdNoBoundsException
- If the given arc is outside the valid area of the given
ILcdModelXYWorldTransformation
ILcdGXYPen.drawArc(com.luciad.shape.ILcdPoint, double, double, double, double, double, com.luciad.transformation.ILcdModelXYWorldTransformation, com.luciad.view.gxy.ILcdGXYViewXYWorldTransformation, java.awt.Graphics)
public boolean isTouched(ILcdPoint aPoint, double aX, double aY, int aSensitivity, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
ILcdGXYPen
aSensitivity
centered on the AWT coordinates of the given model point.
These AWT coordinates are obtained from the given model coordinates by means of the given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.isTouched
in interface ILcdGXYPen
aPoint
- the model pointaX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointaSensitivity
- the allowed tolerance (expressed in pixels)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatespublic boolean isTouched(double aTargetX, double aTargetY, double aX, double aY, int aSensitivity)
aSensitivity
and which is centered on the target AWT point.aTargetX
- the x-coordinate of the target AWT pointaTargetY
- the y-coordinate of the target AWT pointaX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointaSensitivity
- the allowed tolerance (expressed in pixels)public boolean isLineTouched(ILcdPoint aPoint1, ILcdPoint aPoint2, double aX, double aY, boolean aIncludeHotPoint, int aSensitivity, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
ILcdGXYPen
ILcdModelXYWorldTransformation
and
ILcdGXYViewXYWorldTransformation
. The user can specify the allowed tolerance
(aSensitivity
) and whether the test should include the hot points
(aIncludeHotPoint
).isLineTouched
in interface ILcdGXYPen
aPoint1
- the start point of the line (specified in model coordinates)aPoint2
- the end point of the line (specified in model coordinates)aX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointaIncludeHotPoint
- boolean indicating whether to include the hot pointsaSensitivity
- the allowed tolerance (expressed in pixels)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatespublic boolean isHorizontalLineTouched(ILcdPoint aPoint, double aDeltaX, double aX, double aY, boolean aIncludeHotPoint, int aSensitivity, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
The user can specify the allowed tolerance (aSensitivity
) and whether the test should
include the hot points (aIncludeHotPoint
).isHorizontalLineTouched
in interface ILcdGXYPen
aPoint
- the start point of the line (specified in model coordinates)aDeltaX
- the amount by which the x coordinate of the start point is translatedaX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointaIncludeHotPoint
- boolean indicating whether to include the hot pointsaSensitivity
- the allowed tolerance (expressed in pixels)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatespublic boolean isVerticalLineTouched(ILcdPoint aPoint, double aDeltaY, double aX, double aY, boolean aIncludeHotPoint, int aSensitivity, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
The user can specify the allowed tolerance (aSensitivity
) and whether the test should
include the hot points (aIncludeHotPoint
).isVerticalLineTouched
in interface ILcdGXYPen
aPoint
- the start point of the line (specified in model coordinates)aDeltaY
- the amount by which the y coordinate of the start point is translatedaX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointaIncludeHotPoint
- boolean indicating whether to include the hot pointsaSensitivity
- the allowed tolerance (expressed in pixels)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatespublic int getTouchedSegment(ILcdPointList aPointList, boolean aAsPolygon, double aX, double aY, boolean aIncludeHotPoints, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
ILcdGXYPen
ILcdPointList
which is touched by
the given AWT point. If aAsPolygon
equals true, the segment from the last point to
the first point (the index of which equals one less than the number of points in the
ILcdPointList
) is taken into account as well.getTouchedSegment
in interface ILcdGXYPen
aPointList
- the point list defining the line segmentsaAsPolygon
- boolean indicating whether the given point list should be considered as a polygon
or not (in which case it is considered as a polyline)aX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointaIncludeHotPoints
- boolean indicating whether to include the hot pointsaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatespublic boolean isArcTouched(ILcdPoint aCenter, double aA, double aB, double aRotAngle, double aStartAngle, double aArcAngle, double aX, double aY, int aSensitivity, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
are used to transform model coordinates to AWT coordinates.isArcTouched
in interface ILcdGXYPen
aCenter
- the center of the ellipse (specified in model coordinates)aA
- the semi-major axis of the ellipseaB
- the semi-minor axis of the ellipseaRotAngle
- the rotation angle of the major axis of the ellipse (expressed in degrees).
Positive angles are measured counter-clockwise from the line at 3 o'clock.aStartAngle
- the start angle of the arc (expressed in degrees). Positive angles are measured
counter-clockwise from the line at 3 o'clock.aArcAngle
- the span of the arc (expressed in degrees), increasing counterclockwise from
the start angleaX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointaSensitivity
- the allowed tolerance (expressed in pixels)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesILcdArc
,
ILcdGXYPen.drawArc(com.luciad.shape.ILcdPoint, double, double, double, double, double, com.luciad.transformation.ILcdModelXYWorldTransformation, com.luciad.view.gxy.ILcdGXYViewXYWorldTransformation, java.awt.Graphics)
public boolean contains(ILcdPointList aPointList, double aX, double aY, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
ILcdGXYPen
ILcdPointList
containing points specified in model coordinates.
Model coordinates are transformed to AWT coordinates by means of the given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.contains
in interface ILcdGXYPen
aPointList
- the point list defining a polygonaX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesprotected boolean AWTPathContains(ILcdAWTPath aAWTPath, double aX, double aY)
ILcdAWTPath
, encloses the given AWT point.aAWTPath
- the AWT path defining a polygonaX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointpublic Color getHotPointColor()
ILcdGXYPen
.ILcdGXYPen
.setHotPointColor(java.awt.Color)
public void setHotPointColor(Color aHotPointColor)
aHotPointColor
- the hot point color to be setgetHotPointColor()
,
setHotPointIcon(com.luciad.gui.ILcdIcon)
public void setHotPointShape(int aHotPointShape)
setHotPointShape
in interface ILcdGXYPen
aHotPointShape
- the hot point shape to be set (ILcdGXYPen#FILLED_SQUARE,
ILcdGXYPen#VERTICAL_CROSS, ILcdGXYPen#HORIZONTAL_CROSS, ILcdGXYPen#CIRCLE, ILcdGXYPen#FILLED_CIRCLE)getHotPointShape()
,
setHotPointIcon(com.luciad.gui.ILcdIcon)
public int getHotPointShape()
ILcdGXYPen
ILcdGXYPen
.getHotPointShape
in interface ILcdGXYPen
ILcdGXYPen
ILcdGXYPen.setHotPointShape(int)
,
ILcdGXYPen.FILLED_SQUARE
,
ILcdGXYPen.VERTICAL_CROSS
,
ILcdGXYPen.HORIZONTAL_CROSS
,
ILcdGXYPen.CIRCLE
,
ILcdGXYPen.FILLED_CIRCLE
public void setHotPointSize(int aHotPointSize)
setHotPointSize
in interface ILcdGXYPen
aHotPointSize
- the hot point size (expressed in pixels)getHotPointSize()
,
setHotPointIcon(com.luciad.gui.ILcdIcon)
public int getHotPointSize()
getHotPointSize
in interface ILcdGXYPen
setHotPointSize(int)
public void setHotPointIcon(ILcdIcon aIcon)
getHotPointShape()
,
getHotPointSize()
and getHotPointColor()
is rendered.
The default value is null.aIcon
- the icon to be used to render hot pointsgetHotPointIcon()
public ILcdIcon getHotPointIcon()
ILcdGXYPen
.
If equal to null, an icon according to the values in getHotPointShape()
,
getHotPointSize()
and getHotPointColor()
is rendered.setHotPointIcon(ILcdIcon)
public void drawHotPoint(ILcdPoint aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.drawHotPoint
in interface ILcdGXYPen
aPoint
- the position at which the hot point is drawn (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the hot point is drawnTLcdOutOfBoundsException
- If the given model point is outside the valid area of the
given ILcdModelXYWorldTransformation
.public void drawHotPoint(ILcdPoint aPoint, String aReference, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.aPoint
- the position at which the hot point is drawn (expressed in model coordinates)aReference
- the string which has to be drawn next to the given model pointaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the hot point and the string are drawnTLcdOutOfBoundsException
- If the given model point is outside the valid area of the
given ILcdModelXYWorldTransformation
.@Deprecated public void drawHotPoint(Point aPoint, Graphics aGraphics)
drawHotPoint(double, double, Graphics)
, which uses double-precision coordinates.getHotPointShape()
,
getHotPointSize()
and getHotPointColor()
is rendered.aPoint
- the position at which the hot point is drawn (expressed in AWT coordinates)aGraphics
- the Graphics onto which the hot point is drawnpublic void drawHotPoint(double aX, double aY, Graphics aGraphics)
getHotPointShape()
,
getHotPointSize()
and getHotPointColor()
is rendered.drawHotPoint
in interface ILcdGXYPen
aX
- the AWT x coordinate of the position at which the hot point is drawnaY
- the AWT y coordinate of the position at which the hot point is drawnaGraphics
- the Graphics onto which the hot point is drawnpublic void drawHotPoint(double aX, double aY, String aReference, Graphics aGraphics)
getHotPointShape()
,
getHotPointSize()
and getHotPointColor()
is rendered.aX
- the AWT x coordinate of the position at which the hot point is drawnaY
- the AWT y coordinate of the position at which the hot point is drawnaReference
- the string which has to be drawn next to the hot pointaGraphics
- the Graphics onto which the hot point and the string are drawnpublic Object clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in interface ILcdGXYPen
clone
in class Object
Object.clone()
protected void appendCartesianLineTo(ILcdPoint aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdAWTPath
. The given model coordinates of the end point of the
line are transformed to AWT coordinates by means of the given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
If this model point is outside the valid area of the given ILcdModelXYWorldTransformation
or if the line crosses a border of the projection area, a line break is appended to the given
ILcdAWTPath
.aPoint
- the end point (expressed in model coordinates) of the lineaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaAWTPathSFCT
- the AWT path to which the line is appended on return of the methodprotected void appendCartesianPolyline(ILcdPointList aPointList, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdAWTPath
.
A straight line is appended between the AWT coordinates of the points of the polyline.
The polyline is given as an ILcdPointList
of which the points are expressed in
model coordinates. These model coordinates are transformed to AWT coordinates by means of the given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
If a model point is outside the valid area of the given ILcdModelXYWorldTransformation
or a line segment crosses the border of the projection area, a line break is appended to the
given ILcdAWTPath
so that the polyline is split.aPointList
- the point list, expressed in model coordinatesaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaAWTPathSFCT
- the AWT path to which the given point list is appended on return of the methodprotected void appendCartesianArc(ILcdPoint aCenter, double aA, double aB, double aRotAngle, double aStartAngle, double aArcAngle, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdAWTPath
.
The arc is specified as a segment of the circumference of an ellipse. The given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
are used to transform model coordinates to AWT coordinates.
If a point is outside the valid area of the given ILcdModelXYWorldTransformation
,
a line break is appended to the given ILcdAWTPath
so that the polyline is split.aCenter
- the center of the ellipse, expressed in model coordinatesaA
- the semi-major axis of the ellipseaB
- the semi-minor axis of the ellipseaRotAngle
- the rotation angle of the major axis of the ellipse, expressed in degrees.
Positive angles are measured counter-clockwise from the line at 3 o'clock.aStartAngle
- the start angle of the arc (expressed in degrees). Positive angles are measured
counter-clockwise from the line at 3 o'clock.aArcAngle
- the span of the arc (expressed in degrees), increasing counterclockwise from
the start angleaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaAWTPathSFCT
- the AWT path to which the polyline approximation of the given arc is appendedILcdArc
protected void appendCartesianLineTo(ILcdPoint aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT)
ILcdGeneralPath
. The given model coordinates of the end point of
the line are transformed to world coordinates by means of the given
ILcdModelXYWorldTransformation
. If this point is outside the valid area of the
transformation or if the line crosses a border of the projection area, a line break is appended
to the given ILcdGeneralPath
.aPoint
- the end point of the line, expressed in model coordinatesaModelXYWorldTransformation
- the transformation between model and world coordinatesaGeneralPathSFCT
- the general path to which the line is appendedprotected void appendCartesianPolyline(ILcdPointList aPointList, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT)
ILcdGeneralPath
.
A straight line is appended between the world coordinates of the points of the polyline.
The polyline is given as an ILcdPointList
of which the points are expressed in
model coordinates. These model coordinates are transformed to world coordinates by means of the
given ILcdModelXYWorldTransformation
. If a model point is outside the valid area
of this transformation or a line segment crosses the border of the projection area, a line break
is appended to the given ILcdGeneralPath
so that the polyline is split.aPointList
- the point list, expressed in model coordinatesaModelXYWorldTransformation
- the transformation between model and world coordinatesaGeneralPathSFCT
- the general path to which the given point list is appendedprotected void appendCartesianArc(ILcdPoint aCenter, double aA, double aB, double aRotAngle, double aStartAngle, double aArcAngle, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT)
ILcdGeneralPath
.
The arc is specified as a segment of the circumference of an ellipse. The given
ILcdModelXYWorldTransformation
is used to transform model coordinates to world coordinates.
If a point is outside the valid area of this transformation, a line break is appended to the given
ILcdGeneralPath
so that the polyline is split.aCenter
- the center of the ellipse, expressed in model coordinatesaA
- the semi-major axis of the ellipseaB
- the semi-minor axis of the ellipseaRotAngle
- the rotation angle of the major axis of the ellipse (expressed in degrees).
Positive angles are measured counter-clockwise from the line at 3 o'clock.aStartAngle
- the start angle of the arc (expressed in degrees). Positive angles are measured
counter-clockwise from the line at 3 o'clock.aArcAngle
- the span of the arc (expressed in degrees), increasing counterclockwise from
the start angleaModelXYWorldTransformation
- the transformation between model and world coordinatesaGeneralPathSFCT
- the general path to which the polyline approximation of the given arc is appendedILcdArc
protected void drawCartesianArc(double aCenterX, double aCenterY, double aStartX, double aStartY, double aArcAngle, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
Graphics
.
The circular arc is specified by the center of the circle, a point on the circumference of the circle
which denotes the start point of the arc and the angle spanned by the arc.
The given ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
are used to transform between model coordinates and AWT coordinates.aCenterX
- the AWT x coordinate of the center of the circleaCenterY
- the AWT y coordinate of the center of the circleaStartX
- the AWT x coordinate of the start point of the arcaStartY
- the AWT y coordinate of the start point of the arcaArcAngle
- the span of the arc (expressed in degrees), increasing counterclockwise from
the start angleaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaGraphics
- the Graphics onto which the arc is drawnTLcdOutOfBoundsException
- The current implementation does not throw a TLcdOutOfBoundsException
if one of the defining points of the circular arc or one of the points of the arc is outside the
valid area of the transformation.protected double cartesianModelDistance(double aX1, double aY1, double aX2, double aY2, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
aX1
- the x-coordinate of the first AWT pointaY1
- the y-coordinate of the first AWT pointaX2
- the x-coordinate of the second AWT pointaY2
- the y-coordinate of the second AWT pointaModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesTLcdOutOfBoundsException
- The current implementation does not throw a
TLcdOutOfBoundsException
.protected boolean isCartesianLineTouched(ILcdPoint aPoint1, ILcdPoint aPoint2, double aXView, double aYView, boolean aIncludeHotPoint, int aSensitivity, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
ILcdModelXYWorldTransformation
and
ILcdGXYViewXYWorldTransformation
. The user can specify the allowed tolerance
(aSensitivity
) and whether the test should include the hot points
(aIncludeHotPoint
).aPoint1
- the start point of the line, expressed in model coordinatesaPoint2
- the end point of the line, expressed in model coordinatesaXView
- the x-coordinate of the AWT pointaYView
- the y-coordinate of the AWT pointaIncludeHotPoint
- boolean indicating whether to include the hot pointsaSensitivity
- the allowed tolerance (expressed in pixels)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatespublic boolean isViewLineTouched(Point aPoint1, Point aPoint2, double aX, double aY, boolean aIncludeHotPoints, int aSensitivity)
aSensitivity
) and whether the test
should include the hot points (aIncludeHotPoint
).aPoint1
- the start point of the line, expressed in AWT coordinatesaPoint2
- the end point of the line, expressed in AWT coordinatesaX
- the x-coordinate of the AWT pointaY
- the y-coordinate of the AWT pointaIncludeHotPoints
- boolean indicating whether to include the hot pointsaSensitivity
- the allowed tolerance (expressed in pixels)protected boolean isCartesianArcTouched(ILcdPoint aCenter, double aA, double aB, double aRotAngle, double aStartAngle, double aArcAngle, int aViewX, int aViewY, int aSensitivity, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
are used to transform model coordinates to AWT coordinates.aCenter
- the center of the ellipse, expressed in model coordinatesaA
- the semi-major axis of the ellipseaB
- the semi-minor axis of the ellipseaRotAngle
- the rotation angle of the major axis of the ellipse (expressed in degrees).
Positive angles are measured counter-clockwise from the line at 3 o'clock.aStartAngle
- the start angle of the arc (expressed in degrees). Positive angles are measured
counter-clockwise from the line at 3 o'clock.aArcAngle
- the span of the arc (expressed in degrees), increasing counterclockwise from
the start angleaViewX
- the x-coordinate of the AWT pointaViewY
- the y-coordinate of the AWT pointaSensitivity
- the allowed tolerance (expressed in pixels)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesILcdArc
,
drawArc(com.luciad.shape.ILcdPoint, double, double, double, double, double, com.luciad.transformation.ILcdModelXYWorldTransformation, com.luciad.view.gxy.ILcdGXYViewXYWorldTransformation, java.awt.Graphics)
public void appendCurve(ILcdCurve aCurve, boolean aIncludingStartPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdAWTPath
.
The pen assumes C1 continuity of the curve (first derivatives are continuous).aCurve
- the curve which has to be approximated.aIncludingStartPoint
- A boolean indicating whether the start point of the curve should be included.aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaAWTPathSFCT
- an ILcdAWTPath to which the polyline approximation of the curve is addedpublic void appendCurve(ILcdCurve aCurve, boolean aIncludingStartPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT)
ILcdGeneralPath
.
The pen assumes C1 continuity of the curve (first derivatives are continuous).aCurve
- the curve which has to be approximated.aIncludingStartPoint
- A boolean indicating whether the start point of the curve should be included.aModelXYWorldTransformation
- the transformation between model and world coordinatesaGeneralPathSFCT
- an ILcdGeneralPath to which the polyline approximation of the curve is addedpublic void appendParameterizedPath(ILcdParameterizedPath aParameterizedPath, boolean aIncludingStartPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdAWTPath
.aParameterizedPath
- An ILcdParameterizedPath describing the curve which has to be approximated.aIncludingStartPoint
- A boolean indicating whether the start point of the curve should be included.aModelXYWorldTransformation
- the transformation between model and world coordinatesaGXYViewXYWorldTransformation
- the transformation between world and view coordinatesaAWTPathSFCT
- an ILcdAWTPath to which the polyline approximation of the curve is addedpublic void appendParameterizedPath(ILcdParameterizedPath aParameterizedPath, boolean aIncludingStartPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT)
ILcdGeneralPath
.aParameterizedPath
- An ILcdParameterizedPath describing the curve which has to be approximated.aIncludingStartPoint
- A boolean indicating whether the start point of the curve should be included.aModelXYWorldTransformation
- the transformation between model and world coordinatesaGeneralPathSFCT
- an ILcdGeneralPath to which the polyline approximation of the curve is added