eRqlEngine API documentation - http://www.wleklinski.de/rdf/

gr.forth.ics.vrp.visualization
Class Clipping

java.lang.Object
  extended bygr.forth.ics.vrp.visualization.Clipping

public class Clipping
extends Object

Author:
Rammi (rammi@caff.de)

Field Summary
static int ABOVE
          Flag for point lying "above" clipping area.
static int BELOW
          Flag for point lying "below" clipping area.
static int H_CENTER
          Flag for point lying between horizontal bounds of area.
static int INSIDE
          Mask for points which are inside.
static int LEFT
          Flag for point lying left of clipping area.
static int OUTSIDE
          Mask for points which are outside.
static int RIGHT
          Flag for point lying right of clipping area.
static int V_CENTER
          Flag for point lying between vertical bounds of clipping area.
 
Constructor Summary
Clipping()
           
 
Method Summary
protected static Point[] getClipped(double x1, double y1, int mask1, double x2, double y2, int mask2, double xmin, double xmax, double ymin, double ymax)
          Calculate the clipping points of a line with a rectangle.
static Point[] getClipped(int x1, int y1, int x2, int y2, int xmin, int xmax, int ymin, int ymax)
          Calculate the clipping points of a line with a rectangle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEFT

public static final int LEFT
Flag for point lying left of clipping area.

See Also:
Constant Field Values

H_CENTER

public static final int H_CENTER
Flag for point lying between horizontal bounds of area.

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Flag for point lying right of clipping area.

See Also:
Constant Field Values

BELOW

public static final int BELOW
Flag for point lying "below" clipping area.

See Also:
Constant Field Values

V_CENTER

public static final int V_CENTER
Flag for point lying between vertical bounds of clipping area.

See Also:
Constant Field Values

ABOVE

public static final int ABOVE
Flag for point lying "above" clipping area.

See Also:
Constant Field Values

INSIDE

public static final int INSIDE
Mask for points which are inside.

See Also:
Constant Field Values

OUTSIDE

public static final int OUTSIDE
Mask for points which are outside.

See Also:
Constant Field Values
Constructor Detail

Clipping

public Clipping()
Method Detail

getClipped

public static Point[] getClipped(int x1,
                                 int y1,
                                 int x2,
                                 int y2,
                                 int xmin,
                                 int xmax,
                                 int ymin,
                                 int ymax)
Calculate the clipping points of a line with a rectangle.

Parameters:
x1 - starting x of line
y1 - starting y of line
x2 - ending x of line
y2 - ending y of line
xmin - lower left x of rectangle
xmax - upper right x of rectangle
ymin - lower left y of rectangle
ymax - upper right y of rectangle
Returns:
null (does not clip) or array of two points

getClipped

protected static Point[] getClipped(double x1,
                                    double y1,
                                    int mask1,
                                    double x2,
                                    double y2,
                                    int mask2,
                                    double xmin,
                                    double xmax,
                                    double ymin,
                                    double ymax)
Calculate the clipping points of a line with a rectangle.

Parameters:
x1 - starting x of line
y1 - starting y of line
mask1 - clipping info mask for starting point
x2 - ending x of line
y2 - ending y of line
mask2 - clipping info mask for ending point
xmin - lower left x of rectangle
ymin - lower left y of rectangle
xmax - upper right x of rectangle
ymax - upper right y of rectangle
Returns:
null (does not clip) or array of two points

eRqlEngine API documentation - http://www.wleklinski.de/rdf/