|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmr3d.visualization.Graph2D
Graph2D implements some basic functionality for working with drawing graphical primitives to the device display as well as methods for working with colors.
| Field Summary | |
static int |
screenHeight
Stores the height of the screen. |
static int |
screenWidth
Stores the width of the screen. |
| Constructor Summary | |
Graph2D()
|
|
| Method Summary | |
static void |
fillTriangle(Graphics g,
int colorCode,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3)
Draws a triangle on the specified Graphics object filled with the specified color. |
static int |
getColor(int red,
int green,
int blue)
Calculates the int-color code derived from the three specified red, green and blue components. |
static int[] |
getColorComponents(int colorCode)
Calculates the separate color components from a specified color code. |
static int |
mixColors(int colorCode1,
int colorCode2)
Mixes two colors 1 to 1. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int screenHeight
public static int screenWidth
| Constructor Detail |
public Graph2D()
| Method Detail |
public static final void fillTriangle(Graphics g,
int colorCode,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3)
g - Graphics object to draw oncolorCode - color the triangle should be drawn withx1 - x-coordinate of point 1y1 - y-coordinate of point 1x2 - x-coordinate of point 2y2 - y-coordinate of point 2x3 - x-coordinate of point 3y3 - y-coordinate of point 3
public static final int getColor(int red,
int green,
int blue)
red - red component of the color to be calculatedgreen - green component of the color to be calculatedblue - blue component of the color to be calculated
public static final int[] getColorComponents(int colorCode)
colorCode - color code to extract the color componets from
public static final int mixColors(int colorCode1,
int colorCode2)
colorCode1 - first color codecolorCode2 - second color code
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||