public class Graphics
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
clearClip()
Clear the restriction of the draw area.
|
void |
clip()
Restrict the draw area to the valid base coordinate space.
|
void |
drawLine(double[]... coord)
Draw poly line.
|
void |
drawLineBaseRatio(double[]... coord)
Draw poly line.
|
void |
drawPoint(char dot,
double... coord)
Draw a dot with given pattern.
|
void |
drawPoint(double... coord)
Draw a dot.
|
void |
drawPolygon(double[]... coord)
Draw polygon.
|
void |
drawRect(double[] topLeft,
double[] rightBottom)
Draw the outline of the specified rectangle.
|
void |
drawRectBaseRatio(double[] topLeft,
double[] rightBottom)
Draw the outline of the specified rectangle.
|
void |
drawText(java.lang.String label,
double[] coord)
Draw a string.
|
void |
drawText(java.lang.String label,
double rotation,
double[] coord)
Draw a string with given rotation angle.
|
void |
drawText(java.lang.String label,
double horizontalReference,
double verticalReference,
double[] coord)
Draw a string with given reference point.
|
void |
drawText(java.lang.String label,
double horizontalReference,
double verticalReference,
double rotation,
double[] coord)
Draw a string with given reference point and rotation angle.
|
void |
drawTextBaseRatio(java.lang.String label,
double[] coord)
Draw a string with given rotation angle.
|
void |
drawTextBaseRatio(java.lang.String label,
double rotation,
double[] coord)
Draw a string with given rotation angle.
|
void |
drawTextBaseRatio(java.lang.String label,
double horizontalReference,
double verticalReference,
double[] coord)
Draw a string with given reference point.
|
void |
drawTextBaseRatio(java.lang.String label,
double horizontalReference,
double verticalReference,
double rotation,
double[] coord)
Draw a string with given reference point and rotation angle.
|
void |
fillPolygon(double[]... coord)
Fill polygon.
|
void |
fillPolygon(float alpha,
double[]... coord)
Fill polygon.
|
void |
fillRect(double[] topLeft,
double[] rightBottom)
Fill the specified rectangle.
|
void |
fillRectBaseRatio(double[] topLeft,
double[] rightBottom)
Fill the specified rectangle.
|
java.awt.Color |
getColor()
Get the current color.
|
java.awt.Font |
getFont()
Get the current font.
|
java.awt.Graphics2D |
getGraphics()
Returns the Java2D graphics object.
|
double[] |
getLowerBound()
Returns the lower bounds of coordinate space.
|
java.awt.Paint |
getPaint()
Get the current paint object.
|
java.awt.Stroke |
getStroke()
Get the current stroke.
|
double[] |
getUpperBound()
Returns the upper bounds of coordinate space.
|
void |
rotate(double x,
double y)
Rotate the 3D view based on the changes on mouse position.
|
Graphics |
setColor(java.awt.Color color)
Set the color.
|
Graphics |
setFont(java.awt.Font font)
Set the font.
|
void |
setGraphics(java.awt.Graphics2D g2d)
Set the Java2D graphics object.
|
Graphics |
setPaint(java.awt.Paint paint)
Set the paint object.
|
Graphics |
setStroke(java.awt.Stroke stroke)
Set the stroke.
|
public java.awt.Graphics2D getGraphics()
public void setGraphics(java.awt.Graphics2D g2d)
public double[] getLowerBound()
public double[] getUpperBound()
public java.awt.Font getFont()
public Graphics setFont(java.awt.Font font)
public java.awt.Color getColor()
public Graphics setColor(java.awt.Color color)
public java.awt.Paint getPaint()
public Graphics setPaint(java.awt.Paint paint)
public java.awt.Stroke getStroke()
public Graphics setStroke(java.awt.Stroke stroke)
public void clip()
public void clearClip()
public void drawText(java.lang.String label, double[] coord)
public void drawText(java.lang.String label, double rotation, double[] coord)
public void drawText(java.lang.String label, double horizontalReference, double verticalReference, double[] coord)
public void drawText(java.lang.String label, double horizontalReference, double verticalReference, double rotation, double[] coord)
public void drawTextBaseRatio(java.lang.String label, double[] coord)
public void drawTextBaseRatio(java.lang.String label, double rotation, double[] coord)
public void drawTextBaseRatio(java.lang.String label, double horizontalReference, double verticalReference, double[] coord)
public void drawTextBaseRatio(java.lang.String label, double horizontalReference, double verticalReference, double rotation, double[] coord)
public void drawLine(double[]... coord)
public void drawLineBaseRatio(double[]... coord)
public void drawPoint(double... coord)
public void drawPoint(char dot, double... coord)
dot
- the pattern of dot:
public void drawPolygon(double[]... coord)
public void fillPolygon(double[]... coord)
public void fillPolygon(float alpha, double[]... coord)
alpha
- the constant alpha to be multiplied with the alpha of the
source. alpha must be a floating point number in the inclusive range
[0.0, 1.0].public void drawRect(double[] topLeft, double[] rightBottom)
public void drawRectBaseRatio(double[] topLeft, double[] rightBottom)
public void fillRect(double[] topLeft, double[] rightBottom)
public void fillRectBaseRatio(double[] topLeft, double[] rightBottom)
public void rotate(double x, double y)
x
- changes of mouse position on the x axis.y
- changes on mouse position on the y axis.