public interface IPointCanvas extends IPath
Modifier and Type | Method and Description |
---|---|
void |
drawImageData(ImageData src,
double x,
double y,
double width,
double height,
PointRect destArea,
int options)
Scale and draw an ImageData to the PointGraphics, specifying the destination area
that is to be drawn on the PointGraphics - all other sections of the image will
be clipped.
|
void |
drawLine(double x1,
double y1,
double x2,
double y2) |
void |
drawLines(double[] x,
double[] y,
int xoffset,
int yoffset,
int numberOfPoints,
boolean separateLines)
Draw a set of lines either by joining one to the next forming a single unbroken path,
or by drawing sets of separate lines.
|
void |
drawText(char[] data,
int offset,
int length,
double x,
double y)
Draw text at a particular location.
|
void |
freePointCanvas() |
IPointDocument |
getDocument() |
PointFontMetrics |
getPointFontMetrics(PointFont f) |
void |
getUnityTransform(AffineTransform at)
Get the default transform for the canvas.
|
void |
paintPath(boolean useBrush,
boolean usePen)
Stroke/fill the path.
|
void |
paintPolygon(double[] x,
double[] y,
int xoffset,
int yoffset,
int count,
boolean useBrush,
boolean usePen)
Paint a closed polygon.
|
void |
paintRect(double x,
double y,
double width,
double height,
boolean useBrush,
boolean usePen) |
void |
setBrush(Color c,
int style,
int rule) |
void |
setFont(PointFont f) |
void |
setPen(Color c,
int style,
double xWidth,
double yWidth,
float miterLimit) |
void |
setTransform(AffineTransform at)
Set the transform.
|
IPointDocument getDocument()
void freePointCanvas()
void getUnityTransform(AffineTransform at)
at
- a non-null destination AffineTransform.void setTransform(AffineTransform at)
void setPen(Color c, int style, double xWidth, double yWidth, float miterLimit)
void setBrush(Color c, int style, int rule)
void paintPath(boolean useBrush, boolean usePen)
useBrush
- true to fill the path (assuming it is closed).usePen
- true to stroke the path (which is done after filling).void drawText(char[] data, int offset, int length, double x, double y)
x
- the x location for the start of the base line.y
- the y location for the start of the base line.data
- the chars to draw.offset
- the start of the characters.length
- the number of characters.void paintRect(double x, double y, double width, double height, boolean useBrush, boolean usePen)
void paintPolygon(double[] x, double[] y, int xoffset, int yoffset, int count, boolean useBrush, boolean usePen)
x
- the array holding the X co-ordinate points. If y is null then this
also holds the Y co-ordinate points,
either in a separate area or interleaved with the x values.y
- the Y co-ordinate points or null if the Y co-ordinates are in the
x array.xoffset
- the offset into the x array containing the first X point.yoffset
- the offset into the y array containing the first Y point.
If the y array is null then the y points are in the x array. If the yoffset
is equal to xoffset or to xoffset+1, it is assumed that the x and y
co-ordinates are interleaved (first x, then y, then x, then y),
otherwise it is assumed that the x and y co-ordinates
are in non-overlapping contiguous sections within the array.count
- the number of points in the array.void drawLine(double x1, double y1, double x2, double y2)
void drawLines(double[] x, double[] y, int xoffset, int yoffset, int numberOfPoints, boolean separateLines)
x
- the array holding the X co-ordinate points. If y is null then this
also holds the Y co-ordinate points,
either in a separate area or interleaved with the x values.y
- the Y co-ordinate points or null if the Y co-ordinates are in the
x array.xoffset
- the offset into the x array containing the first X point.yoffset
- the offset into the y array containing the first Y point.
If the y array is null then the y points are in the x array. If the yoffset
is equal to xoffset or to xoffset+1, it is assumed that the x and y
co-ordinates are interleaved (first x, then y, then x, then y),
otherwise it is assumed that the x and y co-ordinates
are in non-overlapping contiguous sections within the array.numberOfPoints
- the number of points in the array.separateLines
- true to draw as separate lines (i.e from x0,y0 to x1,y1 and then x2,y2 to x3,y3)
false to draw as a single path (i.e. from x0,y0 to x1,y1 to x2,y2 to x3,y3).void setFont(PointFont f)
PointFontMetrics getPointFontMetrics(PointFont f)
void drawImageData(ImageData src, double x, double y, double width, double height, PointRect destArea, int options)
src
- the source ImageDatax
- the x location where the top left corner of the ImageData would be
if the entire image was drawn.y
- the y location where the top left corner of the ImageData would be
if the entire image was drawn.width
- the full width of the scaled image.height
- the full heigh of the scaled image.destArea
- the destination area being updated on the PointGraphics.
If this is null then the full x, y, width and height values are used.options
- scale options, none of which are currently defined.