public interface GraphicsPainter
BorderPainter
, implementations are created for rendering
primitive graphical operations.Modifier and Type | Method and Description |
---|---|
void |
arcTo(double startAngle,
double endAngle,
int cx,
int cy,
int width,
int height)
Draws an arc on the ellipse centered at (cx, cy) with width width and height height
from start angle startAngle (with respect to the x-axis counter-clockwise)
to the end angle endAngle.
|
void |
clip()
Reduces the current clipping region to the current path.
|
void |
closePath()
Closes the current path.
|
void |
drawBorderLine(int x1,
int y1,
int x2,
int y2,
boolean horz,
boolean startOrBefore,
int style,
Color color)
Draws a border line.
|
void |
drawLine(Point start,
Point end,
int width,
Color color,
RuleStyle style)
Draws a line/rule.
|
void |
lineTo(int x,
int y)
Draws a line from the current cursor position to the given coordinates.
|
void |
moveTo(int x,
int y)
Moves the cursor to the given coordinate.
|
void |
restoreGraphicsState()
Restore the last graphics state from the stack.
|
void |
rotateCoordinates(double angle)
Rotate the coordinate frame
|
void |
saveGraphicsState()
Save the graphics state on the stack.
|
void |
scaleCoordinates(float xScale,
float yScale)
Scale the coordinate frame
|
void |
translateCoordinates(int xTranslate,
int yTranslate)
Translate the coordinate frame
|
void drawBorderLine(int x1, int y1, int x2, int y2, boolean horz, boolean startOrBefore, int style, Color color) throws IOException
x1
- X coordinate of the upper left corner
of the line's bounding rectangle (in millipoints)y1
- start Y coordinate of the upper left corner
of the line's bounding rectangle (in millipoints)x2
- end X coordinate of the lower right corner
of the line's bounding rectangle (in millipoints)y2
- end y coordinate of the lower right corner
of the line's bounding rectangle (in millipoints)horz
- true if it is a horizontal linestartOrBefore
- true if the line is the start or end edge of a border boxstyle
- the border stylecolor
- the border colorIOException
- if an I/O error occursvoid drawLine(Point start, Point end, int width, Color color, RuleStyle style) throws IOException
start
- start point (coordinates in millipoints)end
- end point (coordinates in millipoints)width
- width of the linecolor
- the line colorstyle
- the rule styleIOException
- if an I/O error occursvoid moveTo(int x, int y) throws IOException
x
- the X coordinate (in millipoints)y
- the Y coordinate (in millipoints)IOException
- if an I/O error occursvoid lineTo(int x, int y) throws IOException
x
- the X coordinate (in millipoints)y
- the Y coordinate (in millipoints)IOException
- if an I/O error occursvoid arcTo(double startAngle, double endAngle, int cx, int cy, int width, int height) throws IOException
startAngle
- the start angleendAngle
- the end anglecx
- the x coordinate of the ellipse centercy
- the y coordinate of the ellipse centerwidth
- the extent of the ellipse in the x directionheight
- the extent of the ellipse in the y directionIOException
- if an I/O error occursvoid rotateCoordinates(double angle) throws IOException
angle
- angle in radians to rotate the coordinate frameIOException
- if an I/O error occursvoid translateCoordinates(int xTranslate, int yTranslate) throws IOException
xTranslate
- translation in the x directionyTranslate
- translation in the y directionIOException
- if an I/O error occursvoid scaleCoordinates(float xScale, float yScale) throws IOException
xScale
- scale factor in the x directionyScale
- scale factor in the y directionIOException
- if an I/O error occursvoid closePath() throws IOException
IOException
- if an I/O error occursvoid clip() throws IOException
IOException
- if an I/O error occursvoid saveGraphicsState() throws IOException
IOException
- if an I/O error occursvoid restoreGraphicsState() throws IOException
IOException
- if an I/O error occursCopyright © 2025 Apache Software Foundation. All rights reserved.