| Modifier and Type | Field and Description |
|---|---|
protected I |
image |
protected Q |
penColour |
protected Pixel |
penPosition |
protected int |
penThickness |
protected ImageRenderer<Q,I> |
renderer |
| Constructor and Description |
|---|
Plotter(I image)
Construct a plotter that writes to the given image.
|
Plotter(I image,
Q colour)
Construct a plotter that writes to the given image with the
given initial pen colour.
|
Plotter(I image,
Q colour,
int thickness)
Construct a plotter that writes to the given image.
|
| Modifier and Type | Method and Description |
|---|---|
I |
getImage() |
Q |
getPenColour() |
Pixel |
getPenPosition() |
int |
getPenThickness() |
void |
lineTo(int x,
int y)
Draw a line from the current position to a point
|
void |
lineTo(Pixel p)
Draw a line from the current position to a pixel
|
void |
moveTo(int x,
int y)
Move to a point
|
void |
moveTo(Pixel p)
Move to a pixel
|
void |
setImage(I image) |
void |
setPenColour(Q penColour) |
void |
setPenPosition(Pixel penPosition) |
void |
setPenThickness(int penThickness) |
protected Pixel penPosition
protected int penThickness
public Plotter(I image)
image - the imagepublic Plotter(I image, Q colour)
image - the imagecolour - the pen colourpublic void moveTo(int x, int y)
x - x-positiony - y-positionpublic void lineTo(Pixel p)
p - the pixel to draw topublic void lineTo(int x, int y)
x - the x positiony - the y positionpublic Pixel getPenPosition()
public void setPenPosition(Pixel penPosition)
penPosition - the penPosition to setpublic Q getPenColour()
public void setPenColour(Q penColour)
penColour - the penColour to setpublic int getPenThickness()
public void setPenThickness(int penThickness)
penThickness - the penThickness to set