|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CanvasDrawer
This interface defines an object which renders the content of a ViewerCanvas.
Method Summary | |
---|---|
void |
drawBorder()
Draw a border around the rendered image. |
void |
drawBox(int x,
int y,
int width,
int height,
java.awt.Color color)
Draw a filled box in the rendered image. |
void |
drawBoxes(java.util.List<java.awt.Rectangle> box,
java.awt.Color color)
Draw a set of filled boxes in the rendered image. |
void |
drawDraggedShape(java.awt.Shape shape)
Show feedback to the user in response to a mouse drag, by drawing a Shape over the image. |
void |
drawHRule(int y,
java.awt.Color color)
Draw a horizontal line across the rendered image. |
void |
drawImage(java.awt.Image image,
int x,
int y)
Draw an image onto the canvas. |
void |
drawLine(java.awt.Point p1,
java.awt.Point p2,
java.awt.Color color)
Draw a line into the rendered image. |
void |
drawShape(java.awt.Shape shape,
java.awt.Color color)
Draw the outline of a Shape into the canvas. |
void |
drawString(java.lang.String text,
int x,
int y,
java.awt.Color color)
Draw a piece of text onto the canvas. |
void |
drawVRule(int x,
java.awt.Color color)
Draw a vertical line across the rendered image. |
void |
fillShape(java.awt.Shape shape,
java.awt.Color color)
Draw a filled Shape onto the canvas. |
void |
imageChanged(java.awt.Image image)
This should be called to indicate that a previously drawn image has changed, and cached information for it needs to be discarded. |
void |
renderBox(int x,
int y,
int width,
int height,
double depth,
java.awt.Color color)
Render a filled box at a specified depth in the rendered image. |
void |
renderBoxes(java.util.List<java.awt.Rectangle> box,
java.util.List<java.lang.Double> depth,
java.awt.Color color)
Render a set of filled boxes at specified depths in the rendered image. |
void |
renderImage(java.awt.Image image,
Vec3 p1,
Vec3 p2,
Vec3 p3,
Vec3 p4,
Camera camera)
Render an image onto the canvas. |
void |
renderLine(Vec2 p1,
double zf1,
Vec2 p2,
double zf2,
Camera cam,
java.awt.Color color)
Render a line into the image. |
void |
renderLine(Vec3 p1,
Vec3 p2,
Camera cam,
java.awt.Color color)
Render a line into the image. |
void |
renderMesh(RenderingMesh mesh,
VertexShader shader,
Camera cam,
boolean closed,
boolean[] hideFace)
Render a mesh to the canvas. |
void |
renderMeshTransparent(RenderingMesh mesh,
VertexShader shader,
Camera cam,
Vec3 viewDir,
boolean[] hideFace)
Render an object with flat shading in subtractive (transparent) mode. |
void |
renderWireframe(WireframeMesh mesh,
Camera cam,
java.awt.Color color)
Render a wireframe object. |
void |
setTemplateImage(java.awt.Image im)
Set the template image. |
Method Detail |
---|
void setTemplateImage(java.awt.Image im)
void drawDraggedShape(java.awt.Shape shape)
void drawBorder()
void drawHRule(int y, java.awt.Color color)
void drawVRule(int x, java.awt.Color color)
void drawBox(int x, int y, int width, int height, java.awt.Color color)
void drawBoxes(java.util.List<java.awt.Rectangle> box, java.awt.Color color)
void renderBox(int x, int y, int width, int height, double depth, java.awt.Color color)
void renderBoxes(java.util.List<java.awt.Rectangle> box, java.util.List<java.lang.Double> depth, java.awt.Color color)
void drawLine(java.awt.Point p1, java.awt.Point p2, java.awt.Color color)
void renderLine(Vec3 p1, Vec3 p2, Camera cam, java.awt.Color color)
p1
- the first endpoint of the linep2
- the second endpoint of the linecam
- the camera from which to draw the linecolor
- the line colorvoid renderLine(Vec2 p1, double zf1, Vec2 p2, double zf2, Camera cam, java.awt.Color color)
p1
- the first endpoint of the line, in screen coordinateszf1
- the z coordinate of the first endpoint, in view coordinatesp2
- the second endpoint of the line, in screen coordinateszf2
- the z coordinate of the second endpoint, in view coordinatescam
- the camera from which to draw the linecolor
- the line colorvoid renderWireframe(WireframeMesh mesh, Camera cam, java.awt.Color color)
void renderMeshTransparent(RenderingMesh mesh, VertexShader shader, Camera cam, Vec3 viewDir, boolean[] hideFace)
void renderMesh(RenderingMesh mesh, VertexShader shader, Camera cam, boolean closed, boolean[] hideFace)
void drawString(java.lang.String text, int x, int y, java.awt.Color color)
void drawImage(java.awt.Image image, int x, int y)
void renderImage(java.awt.Image image, Vec3 p1, Vec3 p2, Vec3 p3, Vec3 p4, Camera camera)
image
- the image to renderp1
- the coordinates of the first corner of the imagep2
- the coordinates of the second corner of the imagep3
- the coordinates of the third corner of the imagep4
- the coordinates of the fourth corner of the imagecamera
- the camera from which to draw the imagevoid drawShape(java.awt.Shape shape, java.awt.Color color)
void fillShape(java.awt.Shape shape, java.awt.Color color)
void imageChanged(java.awt.Image image)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |