All Packages Class Hierarchy This Package Previous Next Index
Class fi.helsinki.cs.MapDrawer.FourEdgeScaler
java.lang.Object
|
+----fi.helsinki.cs.MapDrawer.LayoutObject
|
+----fi.helsinki.cs.MapDrawer.FourEdgeScaler
- public class FourEdgeScaler
- extends LayoutObject
MapDrawer's default scaler context -- free-shaped four-edge scaler.
This is perhaps the easiest scaler to use.
-
ep
-
The vertices of the polygon (there should always be four of them).
-
FourEdgeScaler()
-
Initialise this scaler to MapDrawer's default full rectangle.
-
FourEdgeScaler(FourEdgeScaler)
-
-
FourEdgeScaler(RelPoint, RelPoint, RelPoint, RelPoint)
- Initialise this scaler with vertices p1, p2, p3, p4.
-
equals(FourEdgeScaler)
-
-
getBoundRect()
- Get the bounding rectangle of this area.
-
scalePoint(RelPoint)
- Scales a point so that it is within the area between the four
vertices.
-
setProperty(MapDProp)
-
Properties supported by this LayoutObject:
left, right, top, bottom, pt[nr], rotation
-
toPolygon()
- Give the shape of this area as a Polygon.
ep
protected RelPoint ep[]
- The vertices of the polygon (there should always be four of them).
The 1st is the virtual upper left corner; 2nd, the virtual upper
right corner; 3rd, the virtual lower left corner; and 4th, the
virtual lower right corner.
FourEdgeScaler
public FourEdgeScaler()
- Initialise this scaler to MapDrawer's default full rectangle.
This is (( -1, -1 ), ( 1, 1 )).
FourEdgeScaler
public FourEdgeScaler(FourEdgeScaler src)
FourEdgeScaler
public FourEdgeScaler(RelPoint p1,
RelPoint p2,
RelPoint p3,
RelPoint p4)
- Initialise this scaler with vertices p1, p2, p3, p4.
equals
public boolean equals(FourEdgeScaler cmp)
scalePoint
public RelPoint scalePoint(RelPoint org)
- Scales a point so that it is within the area between the four
vertices.
- Overrides:
- scalePoint in class LayoutObject
getBoundRect
public RelRect getBoundRect()
- Get the bounding rectangle of this area.
- Overrides:
- getBoundRect in class LayoutObject
toPolygon
public Vector toPolygon()
- Give the shape of this area as a Polygon.
- Overrides:
- toPolygon in class LayoutObject
setProperty
public int setProperty(MapDProp prop)
- Properties supported by this LayoutObject:
left, right, top, bottom, pt[nr], rotation
- Overrides:
- setProperty in class LayoutObject
All Packages Class Hierarchy This Package Previous Next Index