public class RMPainter extends RMObject
Constructor and Description |
---|
RMPainter()
Creates a new painter shape painter.
|
Modifier and Type | Method and Description |
---|---|
void |
addOp(RMPainterOp anOp)
Adds a new operation.
|
void |
addOp(RMPainterOp anOp,
int anIndex)
Adds a new operation at the given index.
|
RMPainter |
clone()
Standard clone implementation.
|
void |
curveTo(float anX1,
float aY1,
float anX2,
float aY2,
float anX3,
float aY3)
Paint a bezier curve with the given control points and end point.
|
void |
forward(float aDistance)
Adds a forward instruction to cpu.
|
RMRect |
getBounds()
Returns the bounds of the painter shape operations.
|
java.awt.Color |
getColor()
Returns the painting color.
|
float |
getExecutionTime()
Returns the execution time for painter shape operations.
|
<T extends RMPainterOp> |
getLastOpOfClass(java.lang.Class<T> aClass)
Returns the first operation of given class.
|
RMPainterOp |
getOp(int anIndex)
Returns the individual operation at given index.
|
int |
getOpCount()
Returns the number of painter shape operations.
|
RMPainterOp |
getOpOfClass(java.lang.Class aClass)
Returns the first operation of given class.
|
java.util.List<RMPainterOp> |
getOps()
Returns the list of ops.
|
float |
getPaintSpeedDefault()
Returns the default paint speed.
|
float |
getPaintSpeedNow()
Returns the painting speed for path operations.
|
float |
getRoll()
Returns this CPU's current roll.
|
RMLine |
getSegment(RMPainterOp.PathOperation anOp)
Returns a path segment for path operation.
|
float |
getStrokeWidth()
Returns the painting stroke width.
|
double |
getTime()
Returns the painter time.
|
float |
getX()
Returns this CPU's current x position.
|
float |
getY()
Returns this CPU's current y position.
|
int |
indexOfOp(RMPainterOp anOp)
Returns the index of given operation.
|
void |
lineTo(float anX,
float aY)
Paint a line to given coordinates.
|
void |
moveTo(float anX,
float aY)
Move to.
|
void |
paint(java.awt.Graphics2D aGraphics)
Paint.
|
void |
paint(java.awt.Graphics2D aGraphics,
double aTime)
Paint.
|
void |
quadTo(float anX1,
float aY1,
float anX2,
float aY2)
Paint a parabolic curve with the given control point and end point.
|
RMPainterOp |
removeOp(int anIndex)
Removes the operation at given index.
|
int |
removeOp(RMPainterOp anOp)
Removes this given operation.
|
void |
setColor(java.awt.Color aColor)
Sets the painting color.
|
void |
setPaintColor(java.awt.Color aColor)
Sets the paint color for path operations.
|
void |
setPaintSpeed(float aSpeed)
Sets the paint speed for path operations.
|
void |
setPaintSpeedNow(float aSpeed)
Sets the painting speed for path operations.
|
void |
setPaintStrokeWidth(float aWidth)
Sets the paint stroke width for path operations.
|
void |
setStrokeWidth(float aWidth)
Sets the painting stroke width.
|
void |
setTime(double aTime)
Sets the painter time.
|
void |
turn(float anAngle)
Adds a turn instruction to cpu.
|
addPropertyChangeListener, animUpdate, removePropertyChangeListener, toString
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
public int getOpCount()
public RMPainterOp getOp(int anIndex)
public java.util.List<RMPainterOp> getOps()
public void addOp(RMPainterOp anOp)
public void addOp(RMPainterOp anOp, int anIndex)
public RMPainterOp removeOp(int anIndex)
public int removeOp(RMPainterOp anOp)
public int indexOfOp(RMPainterOp anOp)
public RMPainterOp getOpOfClass(java.lang.Class aClass)
public <T extends RMPainterOp> T getLastOpOfClass(java.lang.Class<T> aClass)
public double getTime()
public void setTime(double aTime)
public void setPaintColor(java.awt.Color aColor)
public void setPaintStrokeWidth(float aWidth)
public void setPaintSpeed(float aSpeed)
public void forward(float aDistance)
public void turn(float anAngle)
public void moveTo(float anX, float aY)
public void lineTo(float anX, float aY)
public void quadTo(float anX1, float aY1, float anX2, float aY2)
public void curveTo(float anX1, float aY1, float anX2, float aY2, float anX3, float aY3)
public java.awt.Color getColor()
public void setColor(java.awt.Color aColor)
public float getStrokeWidth()
public void setStrokeWidth(float aWidth)
public float getPaintSpeedNow()
public void setPaintSpeedNow(float aSpeed)
public float getPaintSpeedDefault()
public float getX()
public float getY()
public float getRoll()
public void paint(java.awt.Graphics2D aGraphics)
public void paint(java.awt.Graphics2D aGraphics, double aTime)
public RMLine getSegment(RMPainterOp.PathOperation anOp)
public float getExecutionTime()
public RMRect getBounds()
public RMPainter clone()
clone
in class RMListenerList