public final class DrawTools
extends java.lang.Object
| Constructor and Description |
|---|
DrawTools() |
| Modifier and Type | Method and Description |
|---|---|
static void |
drawParallelogramTexture(java.awt.Graphics2D g2d,
java.awt.image.BufferedImage image,
double[] ximg,
double[] yimg,
double[] xdest,
double[] ydest,
java.lang.Object key)
Draw a texture (ie a BufferedImage) in a parallelogram
|
static void |
drawTriangleTexture(java.awt.Graphics2D g2d,
java.awt.image.BufferedImage image,
double[] ximg,
double[] yimg,
double[] xdest,
double[] ydest,
java.lang.Object key)
Draw a texture (ie a BufferedImage) in a triangle
|
static void |
fillGouraud(java.awt.Graphics2D g2d,
Triangle t)
Fill a triangle in using a Gouraud shading
Only two gradient are used rather than three.
|
public static final void fillGouraud(java.awt.Graphics2D g2d,
Triangle t)
g2d - the Graphics2D where to drawt - the Triangle to fillpublic static final void drawTriangleTexture(java.awt.Graphics2D g2d,
java.awt.image.BufferedImage image,
double[] ximg,
double[] yimg,
double[] xdest,
double[] ydest,
java.lang.Object key)
g2d - the Graphics2D where to drawimage - the texture to applyximg - the x-coordinates of the triangle to use in the textureyimg - the y-coordinates of the triangle to use in the texturexdest - the x-coordinates of the destination triangleydest - the y-coordinates of the destination trianglekey - the rendering hint to use for interpolationpublic static final void drawParallelogramTexture(java.awt.Graphics2D g2d,
java.awt.image.BufferedImage image,
double[] ximg,
double[] yimg,
double[] xdest,
double[] ydest,
java.lang.Object key)
g2d - the Graphics2D where to drawimage - the texture to applyximg - the x-coordinates of the parallelogram to use in the textureyimg - the y-coordinates of the parallelogram to use in the texturexdest - the x-coordinates of the destination parallelogramydest - the y-coordinates of the destination parallelogramkey - the rendering hint to use for interpolation