com.partnersoft.maps.render
Class Clipper

java.lang.Object
  extended by com.partnersoft.maps.render.Clipper

public class Clipper
extends java.lang.Object

Cohen-Sutherland Line-Clipping. copied out of Foley, van Dam, et al Computer Graphics, Principles and Practice pg 113 Otherwise Copyright 2004 Partner Software, Inc.


Field Summary
 boolean accept
           
 double x0
           
 double x1
           
 double xmax
           
 double xmin
           
 double y0
           
 double y1
           
 double ymax
           
 double ymin
           
 
Constructor Summary
Clipper()
           
 
Method Summary
 void clip(double in_x0, double in_y0, double in_x1, double in_y1)
           
 void setRectangle(double in_xmin, double in_xmax, double in_ymin, double in_ymax)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accept

public boolean accept

xmin

public double xmin

xmax

public double xmax

ymin

public double ymin

ymax

public double ymax

x0

public double x0

y0

public double y0

x1

public double x1

y1

public double y1
Constructor Detail

Clipper

public Clipper()
Method Detail

setRectangle

public void setRectangle(double in_xmin,
                         double in_xmax,
                         double in_ymin,
                         double in_ymax)

clip

public void clip(double in_x0,
                 double in_y0,
                 double in_x1,
                 double in_y1)