public class TLcdGXYPen extends ALcdGXYPen implements ILcdGXYPen, Serializable
ILcdGXYPen
for painting and editing elementary shapes defined in a geodetic
model reference or grid reference with very high performance.
The given model coordinates are assumed to be latitude longitude coordinates
or cartesian grid coordinates (the height is not used).
Most of the methods are implemented in an approximate way for the sake of performance
(e.g. lines will be straight lines).
See TLcdGeodeticPen
and
TLcdGridPen
for more accurate pen implementations.ALcdGXYPen.Quality
BEGIN_ARROW_TYPE, END_AND_BEGIN_ARROW_TYPE, END_ARROW_TYPE, fAccumulatedAWTPath, fHotPointColor, fHotPointShape, fHotPointSize, fLastModelPoint, fLastViewPoint, fLastWorldPoint, fValidMove, MIDDLE_BOTH_ARROW_TYPE, MIDDLE_TO_BEGIN_ARROW_TYPE, MIDDLE_TO_END_ARROW_TYPE
CIRCLE, FILLED_CIRCLE, FILLED_SQUARE, HORIZONTAL_CROSS, VERTICAL_CROSS
Constructor and Description |
---|
TLcdGXYPen()
Deprecated.
use
ALcdGXYPen.create(com.luciad.model.ILcdModelReference) to make sure you instantiate the correct pen for your model |
TLcdGXYPen(TLcdGXYPen aGXYPen)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
appendArc(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 . |
void |
appendArc(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 . |
void |
appendHorizontalLineTo(double aDeltaX,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGeneralPath aGeneralPathSFCT)
Appends a horizontal line starting from the current position to the given
ILcdGeneralPath . |
void |
appendHorizontalLineTo(double aDeltaX,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends a horizontal line starting from the current position to the given
ILcdAWTPath . |
void |
appendLineTo(ILcdPoint aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGeneralPath aGeneralPathSFCT)
Appends a line from the current position to the given model point to the given
ILcdGeneralPath . |
void |
appendLineTo(ILcdPoint aPoint,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends a line from the current position to the given model point to the given
ILcdAWTPath . |
void |
appendPointList(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGeneralPath aGeneralPathSFCT)
Appends a polyline to the given
ILcdGeneralPath . |
void |
appendPointList(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends a polyline to the given
ILcdAWTPath . |
void |
appendVerticalLineTo(double aDeltaY,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGeneralPath aGeneralPathSFCT)
Appends a vertical line starting from the current position to the given
ILcdGeneralPath . |
void |
appendVerticalLineTo(double aDeltaY,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcdAWTPath aAWTPathSFCT)
Appends a vertical line starting from the current position to the given
ILcdAWTPath . |
Object |
clone()
Makes
Object.clone() public. |
void |
drawArc(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 |
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 |
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 . |
boolean |
equals(Object aObject) |
boolean |
isLineTouched(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.
|
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.
|
double |
modelDistance(double aX1,
double aY1,
double aX2,
double aY2,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation)
Calculates the model distance between the two given points expressed in AWT coordinates.
|
void |
polylineBoundsSFCT(ILcdPointList aPointList,
ILcdModelXYWorldTransformation aModelXYWorldTransformation,
ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation,
ILcd2DEditableBounds aBoundsSFCT)
Calculates the bounding box in AWT coordinates of the given polyline.
|
accumulateArc, accumulateAWTPoint, accumulateHorizontalLineTo, accumulateLineTo, accumulatePointList, accumulateSplit, accumulateVerticalLineTo, appendCartesianArc, appendCartesianArc, appendCartesianLineTo, appendCartesianLineTo, appendCartesianPolyline, appendCartesianPolyline, appendCurve, appendCurve, appendGeneralPath, appendParameterizedPath, appendParameterizedPath, arcBoundsSFCT, AWTPathContains, calculateAccumulatedAWTBounds, cartesianModelDistance, contains, create, create, drawAccumulatedPolygon, drawAccumulatedPolyline, drawArc, drawCartesianArc, drawHotPoint, drawHotPoint, drawHotPoint, drawHotPoint, drawHotPoint, drawLine, drawLine, drawLineWithArrow, drawPolygon, drawPolyline, emptyAccumulated, fillAccumulatedPolygon, fillPolygon, getAngleThreshold, getHotPointColor, getHotPointIcon, getHotPointShape, getHotPointSize, getMaxRecursionDepth, getMinRecursionDepth, getTouchedSegment, getViewDistanceThreshold, getWorldDistanceThreshold, getX, getXAsDouble, getY, getYAsDouble, isAccumulatedPolylineTouched, isArcTouched, isCartesianArcTouched, isCartesianLineTouched, isHorizontalLineTouched, isTouched, isTouched, isVerticalLineTouched, isViewLineTouched, moveTo, moveTo, moveTo, resetPosition, setAngleThreshold, setHotPointColor, setHotPointIcon, setHotPointShape, setHotPointSize, setMaxRecursionDepth, setMinRecursionDepth, setViewDistanceThreshold, setWorldDistanceThreshold, translateOf
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accumulateArc, accumulateHorizontalLineTo, accumulateLineTo, accumulatePointList, accumulateVerticalLineTo, appendGeneralPath, arcBoundsSFCT, contains, drawAccumulatedPolygon, drawAccumulatedPolyline, drawArc, drawHotPoint, drawHotPoint, drawLine, drawPolygon, drawPolyline, emptyAccumulated, fillAccumulatedPolygon, fillPolygon, getHotPointShape, getHotPointSize, getTouchedSegment, getX, getXAsDouble, getY, getYAsDouble, isArcTouched, isHorizontalLineTouched, isTouched, isVerticalLineTouched, moveTo, moveTo, moveTo, resetPosition, setHotPointShape, setHotPointSize, translateOf
public TLcdGXYPen()
ALcdGXYPen.create(com.luciad.model.ILcdModelReference)
to make sure you instantiate the correct pen for your modelpublic TLcdGXYPen(TLcdGXYPen aGXYPen)
aGXYPen
- the TLcdGXYPen
which has to be clonedpublic 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
drawLineTo
in class ALcdGXYPen
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
drawHorizontalLineTo
in class ALcdGXYPen
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
drawVerticalLineTo
in class ALcdGXYPen
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
drawLineTo
in class ALcdGXYPen
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
.drawLineTo
in class ALcdGXYPen
aPoint
- the point (specified 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 appendLineTo(ILcdPoint aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdGXYPen
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
, a line break is appended to the given
ILcdAWTPath
.appendLineTo
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 coordinatesaAWTPathSFCT
- the AWT path to which the line is appendedpublic void appendHorizontalLineTo(double aDeltaX, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdGXYPen
ILcdAWTPath
.
The model coordinates of the end point of this line are 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 means of the given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
If this model point is outside the valid area of the given ILcdModelXYWorldTransformation
,
a line break is appended to the given ILcdAWTPath
. In case the current position is
undefined, nothing is appended.appendHorizontalLineTo
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 coordinatesaAWTPathSFCT
- the AWT path to which the line is appendedpublic void appendVerticalLineTo(double aDeltaY, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdGXYPen
ILcdAWTPath
.
The model coordinates of the end point of this line are 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 means of the given
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.
If this model point is outside the valid area of the given ILcdModelXYWorldTransformation
,
a line break is appended to the given ILcdAWTPath
. In case the current position is
undefined, nothing is appended.appendVerticalLineTo
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 coordinatesaAWTPathSFCT
- the AWT path to which the line is appendedpublic void appendPointList(ILcdPointList aPointList, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT)
ILcdGXYPen
ILcdAWTPath
.
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
.
If a model 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.appendPointList
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 coordinatesaAWTPathSFCT
- the AWT path to which the given point list is appendedpublic void appendArc(ILcdPoint aCenter, double aA, double aB, double aRotAngle, double aStartAngle, double aArcAngle, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcdAWTPath aAWTPathSFCT) throws TLcdOutOfBoundsException
ILcdGXYPen
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.appendArc
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 coordinatesaAWTPathSFCT
- the AWT path to which the polyline approximation of the given arc is appendedTLcdOutOfBoundsException
- Some implementations may throw an exception in case the center
of the ellipse is outside the valid area of the transformation but this could be avoided by more
advanced implementations.ILcdArc
public void appendLineTo(ILcdPoint aPoint, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT)
ILcdGXYPen
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, a line break is appended to the
given ILcdGeneralPath
.appendLineTo
in interface ILcdGXYPen
aPoint
- the end point (specified in model coordinates) of the lineaModelXYWorldTransformation
- the transformation between model and world coordinatesaGeneralPathSFCT
- the general path to which the line is appendedpublic void appendHorizontalLineTo(double aDeltaX, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT)
ILcdGXYPen
ILcdGeneralPath
.
The model coordinates of the end point of this line are 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 world coordinates by means of the given
ILcdModelXYWorldTransformation
. If this point is outside the valid area of this
transformation, a line break is appended to the given ILcdGeneralPath
. In case the
current position is undefined, nothing is appended.appendHorizontalLineTo
in interface ILcdGXYPen
aDeltaX
- the amount by which the model x coordinate of the current position is translatedaModelXYWorldTransformation
- the transformation between model and world coordinatesaGeneralPathSFCT
- the general path to which the line is appendedpublic void appendVerticalLineTo(double aDeltaY, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT)
ILcdGXYPen
ILcdGeneralPath
.
The model coordinates of the end point of this line are 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 world coordinates by means of the given
ILcdModelXYWorldTransformation
. If this point is outside the valid area of this
transformation, a line break is appended to the given ILcdGeneralPath
. In case the
current position is undefined, nothing is appended.appendVerticalLineTo
in interface ILcdGXYPen
aDeltaY
- the amount by which the model y coordinate of the current position is translatedaModelXYWorldTransformation
- the transformation between model and world coordinatesaGeneralPathSFCT
- the general path to which the line is appendedpublic void appendPointList(ILcdPointList aPointList, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT)
ILcdGXYPen
ILcdGeneralPath
.
The polyline is given as an ILcdPointList
of which the points are specified 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, a line break is appended to the given ILcdGeneralPath
so that
the polyline is split.appendPointList
in interface ILcdGXYPen
aPointList
- the point list (specified in model coordinates)aModelXYWorldTransformation
- the transformation between model and world coordinatesaGeneralPathSFCT
- the general path to which the given point list is appendedpublic void appendArc(ILcdPoint aCenter, double aA, double aB, double aRotAngle, double aStartAngle, double aArcAngle, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGeneralPath aGeneralPathSFCT) throws TLcdOutOfBoundsException
ILcdGXYPen
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.appendArc
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 coordinatesaGeneralPathSFCT
- the general path to which the polyline approximation of the given arc is appendedTLcdOutOfBoundsException
- Some implementations may throw an exception in case the center
of the ellipse is outside the valid area of the transformation but this could be avoided by more
advanced implementations.ILcdArc
public void drawArc(double aCenterX, double aCenterY, double aStartX, double aStartY, double aArcAngle, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, Graphics aGraphics) throws TLcdOutOfBoundsException
ILcdGXYPen
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.drawArc
in interface ILcdGXYPen
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
- Some implementations may throw an exception in case one of the defining
points of the circular arc 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.public double modelDistance(double aX1, double aY1, double aX2, double aY2, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation) throws TLcdOutOfBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.modelDistance
in interface ILcdGXYPen
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
- If one of the two given points is outside the valid area of the
given ILcdModelXYWorldTransformation
.public void lineBoundsSFCT(ILcdPoint aPoint1, ILcdPoint aPoint2, ILcdModelXYWorldTransformation aModelXYWorldTransformation, ILcdGXYViewXYWorldTransformation aGXYViewXYWorldTransformation, ILcd2DEditableBounds aBoundsSFCT) throws TLcdNoBoundsException
ILcdGXYPen
ILcdModelXYWorldTransformation
and ILcdGXYViewXYWorldTransformation
.lineBoundsSFCT
in interface ILcdGXYPen
lineBoundsSFCT
in class ALcdGXYPen
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
polylineBoundsSFCT
in class ALcdGXYPen
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 boolean isLineTouched(ILcdPoint aPoint1, ILcdPoint aPoint2, double aXView, double aYView, 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
isLineTouched
in class ALcdGXYPen
aPoint1
- the start point of the line (specified in model coordinates)aPoint2
- the end point of the line (specified in model coordinates)aXView
- 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 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 ALcdGXYPen
Object.clone()