PenProfile 2.x

com.livescribe.geom
Class RectangleBoundsStrategy

java.lang.Object
  extended by com.livescribe.geom.RectangleBoundsStrategy
All Implemented Interfaces:
BoundsStrategy

public class RectangleBoundsStrategy
extends Object
implements BoundsStrategy

A bounds strategy that calculates a rectangular bounding polygon around a set of Shapes.

Since:
2.3
See Also:
Shape

Constructor Summary
RectangleBoundsStrategy()
          Creates a new rectangle bounds strategy.
 
Method Summary
 void addShape(Shape s)
          Adds a set of points to the bounds.
 Shape getBounds()
          Gets the accumulated bounds.
 void resetBounds()
          Resets the bounds.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RectangleBoundsStrategy

public RectangleBoundsStrategy()
Creates a new rectangle bounds strategy.

Method Detail

addShape

public void addShape(Shape s)
Adds a set of points to the bounds.

Specified by:
addShape in interface BoundsStrategy
Parameters:
s - the set of points to add
See Also:
Shape

resetBounds

public void resetBounds()
Resets the bounds.

Specified by:
resetBounds in interface BoundsStrategy

getBounds

public Shape getBounds()
Gets the accumulated bounds. This returns an empty rectangle if no points have been added.

Specified by:
getBounds in interface BoundsStrategy
Returns:
the accumulated bounds or an empty rectangle if no points have been added.
See Also:
BoundsStrategy.addShape(Shape)

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.