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.


Variable Index

 o ep
The vertices of the polygon (there should always be four of them).

Constructor Index

 o FourEdgeScaler()
Initialise this scaler to MapDrawer's default full rectangle.
 o FourEdgeScaler(FourEdgeScaler)
 o FourEdgeScaler(RelPoint, RelPoint, RelPoint, RelPoint)
Initialise this scaler with vertices p1, p2, p3, p4.

Method Index

 o equals(FourEdgeScaler)
 o getBoundRect()
Get the bounding rectangle of this area.
 o scalePoint(RelPoint)
Scales a point so that it is within the area between the four vertices.
 o setProperty(MapDProp)
Properties supported by this LayoutObject: left, right, top, bottom, pt[nr], rotation
 o toPolygon()
Give the shape of this area as a Polygon.

Variables

 o 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.

Constructors

 o FourEdgeScaler
 public FourEdgeScaler()
Initialise this scaler to MapDrawer's default full rectangle. This is (( -1, -1 ), ( 1, 1 )).

 o FourEdgeScaler
 public FourEdgeScaler(FourEdgeScaler src)
 o FourEdgeScaler
 public FourEdgeScaler(RelPoint p1,
                       RelPoint p2,
                       RelPoint p3,
                       RelPoint p4)
Initialise this scaler with vertices p1, p2, p3, p4.

Methods

 o equals
 public boolean equals(FourEdgeScaler cmp)
 o 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
 o getBoundRect
 public RelRect getBoundRect()
Get the bounding rectangle of this area.

Overrides:
getBoundRect in class LayoutObject
 o toPolygon
 public Vector toPolygon()
Give the shape of this area as a Polygon.

Overrides:
toPolygon in class LayoutObject
 o 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