public class

Rect

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

Class Overview

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

Summary

[Expand]
Inherited Fields
From class casmi.graphics.element.Element
Public Constructors
Rect(double width, double height)
Creates a new Rect object using width and height.
Rect(double x, double y, double width, double height)
Public Methods
double getHeight()
Gets height of this Rect.
Texture getTexture()
double getWidth()
Gets width of this Rect.
void render(GL2 gl, GLU glu, int width, int height, boolean selection)
void reset(GL2 gl)
void set(double width, double height)
Sets width and height of this Rect.
void setGradationColor(GradationMode2D mode, ColorSet colorSet1, ColorSet colorSet2)
Sets the gradation mode and colors.
void setGradationColor(GradationMode2D mode, Color color1, Color color2)
Sets the gradation mode and colors.
void setGradationMode(GradationMode2D mode)
Sets the gradation mode and colors.
void setHeight(double height)
Sets height of this Rect.
void setTexture(Texture texture)
void setWidth(double width)
Sets width of this Rect.
[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 Rect (double width, double height)

Creates a new Rect object using width and height.

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

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

Public Methods

public double getHeight ()

Gets height of this Rect.

Returns
  • The height of the Rect.

public Texture getTexture ()

public double getWidth ()

Gets width of this Rect.

Returns
  • The width of the Rect.

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

public void reset (GL2 gl)

public void set (double width, double height)

Sets width and height of this Rect.

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

public void setGradationColor (GradationMode2D mode, ColorSet colorSet1, ColorSet colorSet2)

Sets the gradation mode and colors.

Parameters
mode The mode of gradation.
colorSet1 The colorSet for gradation.
colorSet2 The colorSet for gradation.
See Also

public void setGradationColor (GradationMode2D mode, Color color1, Color color2)

Sets the gradation mode and colors.

Parameters
mode The mode of gradation.
color1 The color for gradation.
color2 The color for gradation.
See Also

public void setGradationMode (GradationMode2D mode)

Sets the gradation mode and colors.

Parameters
mode The mode of gradation.

public void setHeight (double height)

Sets height of this Rect.

Parameters
height The height of the rectangle.

public void setTexture (Texture texture)

public void setWidth (double width)

Sets width of this Rect.

Parameters
width The width of the rectangle.