Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.views.styledmap.clip.impl
Class AbstractPolygonClip

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.views.styledmap.clip.impl.AbstractPolygonClip
All Implemented Interfaces:
Clip
Direct Known Subclasses:
BottomLeftClip, BottomRightClip, TopLeftClip, TopRightClip

public abstract class AbstractPolygonClip
extends Object
implements Clip

Base class for clip's based on a polygon defined on the view-port.

Author:
Simon Templer

Constructor Summary
AbstractPolygonClip()
           
 
Method Summary
 Shape getClip(Rectangle viewportBounds, int originX, int originY, int width, int height)
          Determine the clip region for painting.
protected abstract  Polygon getVisiblePolygon(Rectangle viewportBounds)
          Get the visible area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPolygonClip

public AbstractPolygonClip()
Method Detail

getClip

public Shape getClip(Rectangle viewportBounds,
                     int originX,
                     int originY,
                     int width,
                     int height)
Description copied from interface: Clip
Determine the clip region for painting.

Specified by:
getClip in interface Clip
Parameters:
viewportBounds - the view-port bounds (world pixel coordinates)
originX - the x position of the origin of the graphics to clip (world pixel coordinates)
originY - the y position of the origin of the graphics to clip (world pixel coordinates)
width - the graphics width
height - the graphics height
Returns:
the clip shape, or null if nothing should be painted
See Also:
Clip.getClip(Rectangle, int, int, int, int)

getVisiblePolygon

protected abstract Polygon getVisiblePolygon(Rectangle viewportBounds)
Get the visible area.

Parameters:
viewportBounds - the view-port bounds
Returns:
the visible area in world pixel coordinates

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d