public class RMPaintbot
extends SnapObject
Modifier and Type | Class and Description |
---|---|
static class |
RMPaintbot.CurveTo
A path construction operation for painting a bezier curve.
|
static class |
RMPaintbot.Forward
An op class for moving a shape forward along the path of its current roll.
|
static class |
RMPaintbot.Jump
An op class for moving a shape forward along the path of its current roll.
|
static class |
RMPaintbot.LineTo
A path construction operation for painting a line.
|
static class |
RMPaintbot.MoveTo
An inner class for path move to.
|
static class |
RMPaintbot.Op
A class representing an operation to an painter shape, like MoveTo or LineTo.
|
static class |
RMPaintbot.PathOperation
An inner class for path construction operations.
|
static class |
RMPaintbot.QuadTo
A path construction operation for painting a quadratic curve.
|
static class |
RMPaintbot.SetPaintColor
An operation to set paint color.
|
static class |
RMPaintbot.SetPaintSpeed
An operation to set painting speed.
|
static class |
RMPaintbot.SetStrokeWidth
An operation to set stroke width.
|
static class |
RMPaintbot.Turn
An op class for turning a shape by a given number of degrees.
|
Constructor and Description |
---|
RMPaintbot()
Creates a new painter shape painter.
|
Modifier and Type | Method and Description |
---|---|
void |
addOp(RMPaintbot.Op anOp)
Adds a new operation.
|
RMPaintbot |
clone()
Standard clone implementation.
|
void |
close()
Closes a path.
|
void |
curveTo(double anX1,
double aY1,
double anX2,
double aY2,
double anX3,
double aY3)
Paint a bezier curve with the given control points and end point.
|
void |
forward(double aDistance)
Adds a forward instruction to cpu.
|
RMRect |
getBounds()
Returns the bounds of the painter shape operations.
|
float |
getExecutionTime()
Returns the execution time for painter shape operations.
|
<T extends RMPaintbot.Op> |
getLastOpOfClass(java.lang.Class<T> aClass)
Returns the first operation of given class.
|
RMPaintbot.Op |
getOp(int anIndex)
Returns the individual operation at given index.
|
int |
getOpCount()
Returns the number of painter shape operations.
|
RMPaintbot.Op |
getOpOfClass(java.lang.Class aClass)
Returns the first operation of given class.
|
java.util.List<RMPaintbot.Op> |
getOps()
Returns the list of ops.
|
float |
getPaintSpeedDefault()
Returns the default paint speed.
|
float |
getRoll()
Returns this CPU's current roll.
|
double |
getX()
Returns this CPU's current x position.
|
double |
getY()
Returns this CPU's current y position.
|
void |
jump(double aDistance)
Adds a Jump instruction to cpu.
|
void |
lineTo(double anX,
double aY)
Paint a line to given coordinates.
|
void |
moveTo(double anX,
double aY)
Move to.
|
RMLine |
paint(java.awt.Graphics2D aGraphics,
double aTime)
Paint.
|
void |
quadTo(double anX1,
double aY1,
double anX2,
double aY2)
Paint a parabolic curve with the given control point and end point.
|
void |
setPaintColor(java.awt.Color aColor)
Sets the paint color for path operations.
|
void |
setPaintSpeed(double aSpeed)
Sets the paint speed for path operations.
|
void |
setPaintStrokeWidth(double aWidth)
Sets the paint stroke width for path operations.
|
void |
turn(double anAngle)
Adds a turn instruction to cpu.
|
public int getOpCount()
public RMPaintbot.Op getOp(int anIndex)
public java.util.List<RMPaintbot.Op> getOps()
public void addOp(RMPaintbot.Op anOp)
public RMPaintbot.Op getOpOfClass(java.lang.Class aClass)
public <T extends RMPaintbot.Op> T getLastOpOfClass(java.lang.Class<T> aClass)
public void setPaintColor(java.awt.Color aColor)
public void setPaintStrokeWidth(double aWidth)
public void setPaintSpeed(double aSpeed)
public void forward(double aDistance)
public void jump(double aDistance)
public void turn(double anAngle)
public void moveTo(double anX, double aY)
public void lineTo(double anX, double aY)
public void quadTo(double anX1, double aY1, double anX2, double aY2)
public void curveTo(double anX1, double aY1, double anX2, double aY2, double anX3, double aY3)
public void close()
public float getPaintSpeedDefault()
public double getX()
public double getY()
public float getRoll()
public RMLine paint(java.awt.Graphics2D aGraphics, double aTime)
public float getExecutionTime()
public RMRect getBounds()
public RMPaintbot clone()