org.wicketstuff.yui.markup.html.ellipse
Class EllipseHelper

java.lang.Object
  extended by org.wicketstuff.yui.markup.html.ellipse.EllipseHelper
All Implemented Interfaces:
Serializable

public class EllipseHelper
extends Object
implements Serializable

EllipseHelper will help generate the points needed. x = a cos theta y = b sin theta

Author:
josh
See Also:
Serialized Form

Constructor Summary
EllipseHelper(double width, double height, int segments)
          Construct
EllipseHelper(int segments)
          construct
 
Method Summary
 double getHeight()
           
 int getLeft(int segment)
          the Left value in HTML position terms by add half-width because the centre of the ellipse is half-width from the 0,0 position in HTML
 int getSegments()
           
 float getTheta()
           
 int getTop(int segment)
          the Left value in HTML position terms by add half-height because the centre of the ellipse is half-height from the 0,0 position in HTML
 double getWidth()
           
 double getX(int segment)
          x = a cos theta a is half width
 double getY(int segment)
          y = b sin theta
 void setHeight(double height)
           
 void setSegments(int segments)
           
 void setTheta(float theta)
           
 void setWidth(double width)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EllipseHelper

public EllipseHelper(double width,
                     double height,
                     int segments)
Construct

Parameters:
width -
height -
segments -

EllipseHelper

public EllipseHelper(int segments)
construct

Method Detail

getX

public double getX(int segment)
x = a cos theta a is half width

Parameters:
segment -
Returns:

getY

public double getY(int segment)
y = b sin theta

Parameters:
segment -
Returns:

getLeft

public int getLeft(int segment)
the Left value in HTML position terms by add half-width because the centre of the ellipse is half-width from the 0,0 position in HTML

Parameters:
segment -
Returns:

getTop

public int getTop(int segment)
the Left value in HTML position terms by add half-height because the centre of the ellipse is half-height from the 0,0 position in HTML

Parameters:
segment -
Returns:

getWidth

public double getWidth()

setWidth

public void setWidth(double width)

getHeight

public double getHeight()

setHeight

public void setHeight(double height)

getSegments

public int getSegments()

setSegments

public void setSegments(int segments)

getTheta

public float getTheta()

setTheta

public void setTheta(float theta)


Copyright © 2006-2012 Wicket developers. All Rights Reserved.