public class

RoundRect

extends Element
java.lang.Object
   ↳ casmi.graphics.element.Element
     ↳ casmi.graphics.element.RoundRect

Class Overview

RoundRect class. Wrap JOGL and make it easy to use.

Summary

Nested Classes
enum RoundRect.ShapeMode  
[Expand]
Inherited Fields
From class casmi.graphics.element.Element
Public Constructors
RoundRect(double x, double y, double width, double height)
Creates a new RoundRect object using position of the upper-left corner, width and height.
RoundRect(double width, double height)
Creates a new RoundRect object using width and height.
RoundRect(double radius, double width, double height)
Creates a new RoundRect object using radius, width and height.
RoundRect(double radius, double x, double y, double width, double height)
Creates a new RoundRect object using radius, position of the upper-left corner, width and height.
Public Methods
final double getHeight()
Gets height of this RoundRect.
final double getPrecision()
Gets the precision of the corner arc.
final double getRadius()
Gets the radius of the corner of this RoundRect.
final double getWidth()
Gets width of this RoundRect.
final void rectMode(RoundRect.ShapeMode mode)
Align the position of this RoundRect
void render(GL2 gl, GLU glu, int width, int height, boolean selection)
void reset(GL2 gl)
final void setHeight(double height)
Sets height of this RoundRect
final void setPrecision(double precision)
Sets the precision of the corner arc.
final void setRadius(double radius)
Sets the radius of the corner of this RoundRect.
final void setWidth(double width)
Sets width of this RoundRect.
[Expand]
Inherited Methods
From class casmi.graphics.element.Element
From class java.lang.Object
From interface casmi.graphics.object.Renderable
From interface casmi.graphics.object.Resettable

Public Constructors

public RoundRect (double x, double y, double width, double height)

Creates a new RoundRect object using position of the upper-left corner, width and height.

Parameters
x The x-coordinate of the upper-left corner.
y The y-coordinate of the upper-left corner.
width The width of the rectangle.
height The height of the rectangle.

public RoundRect (double width, double height)

Creates a new RoundRect object using width and height.

Parameters
width The width of the rectangle.
height The height of the rectangle.

public RoundRect (double radius, double width, double height)

Creates a new RoundRect object using radius, width and height.

Parameters
radius The radius of the corner.
width The width of the rectangle.
height The height of the rectangle.

public RoundRect (double radius, double x, double y, double width, double height)

Creates a new RoundRect object using radius, position of the upper-left corner, width and height.

Parameters
radius The radius of the corner.
x The x-coordinate of the upper-left corner.
y The y-coordinate of the upper-left corner.
width The width of the rectangle.
height The height of the rectangle.

Public Methods

public final double getHeight ()

Gets height of this RoundRect.

Returns
  • The height of the RoundRect.

public final double getPrecision ()

Gets the precision of the corner arc.

Returns
  • The precision of the corner.

public final double getRadius ()

Gets the radius of the corner of this RoundRect.

Returns
  • The radius of the corner.

public final double getWidth ()

Gets width of this RoundRect.

Returns
  • The width of the RoundRect.

public final void rectMode (RoundRect.ShapeMode mode)

Align the position of this RoundRect

Parameters
mode The Alignment of the position.

public void render (GL2 gl, GLU glu, int width, int height, boolean selection)

public void reset (GL2 gl)

public final void setHeight (double height)

Sets height of this RoundRect

Parameters
height The height of the RoundRect.

public final void setPrecision (double precision)

Sets the precision of the corner arc.

Parameters
precision The precision of the corner.

public final void setRadius (double radius)

Sets the radius of the corner of this RoundRect.

Parameters
radius The radius of the corner.

public final void setWidth (double width)

Sets width of this RoundRect.

Parameters
width The width of the RoundRect.