Package com.luciad.view.gxy
Interface ILcdGeneralPath
- All Known Implementing Classes:
TLcdGeneralPath
public interface ILcdGeneralPath
ILcdGeneralPath is an interface defining a general path
in world coordinates. Such a path is generally used as support for
converting and caching polygons and polylines.
A path contains 0 or more subpaths. A subpath contains 0 or more points.
Each subpath is terminated by a line break, a polygon break, or a polygon
closure.-
Method Summary
Modifier and TypeMethodDescriptionvoidAppends a line break to the path.voidAppends a polygon break to the path.voidcalculateWorldBoundsSFCT(ILcd2DEditableBounds aBoundsSFCT) Returns a bounding box of thisILcdGeneralPath(in world coordinates) in the side effect parameteraBoundsSFCT.voidCloses the current polygon.doublegetX(int aSubpathIndex, int aPointIndex) doublegetY(int aSubpathIndex, int aPointIndex) voidlineTo(double aX, double aY) Appends a line to the world point(aX, aY).voidmoveTo(double aX, double aY) Breaks the current line and moves to the world point(aX, aY).booleanpolygonContains(double aX, double aY) Checks whether the given point is contained by the polygon represented by thisILcdGeneralPath.voidreset()Resets the path.booleansubPathBreaksLine(int aSubpathIndex) booleansubPathBreaksPolygon(int aSubpathIndex) booleansubPathClosesPolygon(int aSubpathIndex) intintsubPathLength(int aSubpathIndex)
-
Method Details
-
moveTo
void moveTo(double aX, double aY) Breaks the current line and moves to the world point(aX, aY). -
lineTo
void lineTo(double aX, double aY) Appends a line to the world point(aX, aY). -
reset
void reset()Resets the path. The path becomes empty, containing no subpaths and thus no points. -
breakLine
void breakLine()Appends a line break to the path. Subsequent points will define a new polyline. The points will continue to define the same current polygon, however. For example, when a polygon in a model is represented by more than 1 polygon in world coordinates. This is possible in some projections where the polygon is at the edge of the projection and wraps around to the other edge. -
breakPolygon
void breakPolygon()Appends a polygon break to the path. Subsequent points will define a detached polygonal piece of the current polygon. -
closePolygon
void closePolygon()Closes the current polygon. Subsequent points will define a new polygon or hole. -
subPathCount
int subPathCount()- Returns:
- the number of subpaths.
-
subPathLength
int subPathLength(int aSubpathIndex) - Returns:
- the length of the subpath at the given index.
-
subPathBreaksLine
boolean subPathBreaksLine(int aSubpathIndex) - Returns:
- whether the subpath at the given index represents a broken line.
-
subPathBreaksPolygon
boolean subPathBreaksPolygon(int aSubpathIndex) - Returns:
- whether the subpath at the given index represents a broken part of a polygon.
-
subPathClosesPolygon
boolean subPathClosesPolygon(int aSubpathIndex) - Returns:
- whether the subpath at the given index represents a closing part of a polygon.
-
getX
double getX(int aSubpathIndex, int aPointIndex) - Returns:
- the x coordinate of the subpath point at the given indices.
-
getY
double getY(int aSubpathIndex, int aPointIndex) - Returns:
- the y coordinate of the subpath point at the given indices.
-
calculateWorldBoundsSFCT
Returns a bounding box of thisILcdGeneralPath(in world coordinates) in the side effect parameteraBoundsSFCT.- Throws:
TLcdNoBoundsException- if no bounds are available
-
polygonContains
boolean polygonContains(double aX, double aY) Checks whether the given point is contained by the polygon represented by thisILcdGeneralPath.
-