Package snap.gfx3d
Class Painter3D
java.lang.Object
snap.gfx3d.Painter3D
- All Implemented Interfaces:
Cloneable
This class renders 2D painting on a 3D plane.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
This class represents a discrete paint task. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayerOffset
(double aDist) Adds an offset (along normal) so successive drawing is above previous drawing.protected void
addPaintTask
(Painter3D.PaintTask aTask) Adds a PaintTask.clone()
Standard clone implementation.void
Adds a close path segment.void
cubicTo
(double aC1X, double aC1Y, double aC2X, double aC2Y, double aX, double aY) Adds a cubic segment.void
Draws the given shape.void
drawRect
(double aX, double aY, double aW, double aH) Draws a rect.void
flipX()
Flips painter by X.void
flipY()
Flips painter by Y.void
Flushes the current task.getColor()
Returns the current paint.double
Returns the height.Returns the PaintTasks.Returns the current stroke.Returns the VertexArray for drawing.double
getWidth()
Returns the width.void
lineTo
(double aX, double aY) Adds a lineTo segment.void
moveTo
(double aX, double aY) Adds a moveTo segment.void
quadTo
(double aCX, double aCY, double aX, double aY) Adds a quad segment.void
Sets the current paint.void
Sets the current stroke.
-
Constructor Details
-
Painter3D
public Painter3D(double aWidth, double aHeight) Constructor.
-
-
Method Details
-
getWidth
public double getWidth()Returns the width. -
getHeight
public double getHeight()Returns the height. -
getColor
Returns the current paint. -
setColor
Sets the current paint. -
getStroke
Returns the current stroke. -
setStroke
Sets the current stroke. -
draw
Draws the given shape. -
drawRect
public void drawRect(double aX, double aY, double aW, double aH) Draws a rect. -
moveTo
public void moveTo(double aX, double aY) Adds a moveTo segment. -
lineTo
public void lineTo(double aX, double aY) Adds a lineTo segment. -
quadTo
public void quadTo(double aCX, double aCY, double aX, double aY) Adds a quad segment. -
cubicTo
public void cubicTo(double aC1X, double aC1Y, double aC2X, double aC2Y, double aX, double aY) Adds a cubic segment. -
closePath
public void closePath()Adds a close path segment. -
addLayerOffset
public void addLayerOffset(double aDist) Adds an offset (along normal) so successive drawing is above previous drawing. -
flushTask
public void flushTask()Flushes the current task. -
getPaintTasks
Returns the PaintTasks. -
addPaintTask
Adds a PaintTask. -
flipX
public void flipX()Flips painter by X. -
flipY
public void flipY()Flips painter by Y. -
getTriangleArray
Returns the VertexArray for drawing. -
clone
Standard clone implementation.
-