public class Java2dBackend extends Object implements GraphicsBackend<AbstractImageGraphicsItem>
| Modifier and Type | Class and Description |
|---|---|
static class |
Java2dBackend.Java2dFont |
GraphicsBackend.Alignment, GraphicsBackend.Font| Modifier and Type | Field and Description |
|---|---|
static FontRenderContext |
FRC |
| Constructor and Description |
|---|
Java2dBackend() |
| Modifier and Type | Method and Description |
|---|---|
AbstractImageGraphicsItem |
arrow(Point2D tip,
Point2D fromPoint,
Rectangle2D dimensions,
Color color)
Creates a new arrow item.
|
AbstractImageGraphicsItem |
cubicCurve(CubicCurve2D curveData,
Stroke strokeStyle,
Color color)
Creates a new item that draws a cubic curve.
|
GraphicsBackend.Font |
getFont(Font original,
int pointSize,
int style)
Returns a backend font object.
|
AbstractImageGraphicsItem |
group()
Creates a new grouping item.
|
AbstractImageGraphicsItem |
makeLabel(String label,
Point2D pos,
GraphicsBackend.Font font,
Color color,
GraphicsBackend.Alignment alignment,
Shape shape)
Creates a new label item.
|
AbstractImageGraphicsItem |
makeLines(Collection<Line2D> lines,
Color color,
Stroke stroke) |
public static final FontRenderContext FRC
public AbstractImageGraphicsItem arrow(Point2D tip, Point2D fromPoint, Rectangle2D dimensions, Color color)
GraphicsBackendarrow in interface GraphicsBackend<AbstractImageGraphicsItem>tip - The point of the arrow's tip.fromPoint - The point that specifies the direction from which the arrow is pointing.dimensions - The dimensions (width, height) of the arrow.color - The fill color.public AbstractImageGraphicsItem cubicCurve(CubicCurve2D curveData, Stroke strokeStyle, Color color)
GraphicsBackendcubicCurve in interface GraphicsBackend<AbstractImageGraphicsItem>curveData - The curve data.strokeStyle - The stroking style for the curve.color - The stroke color.public GraphicsBackend.Font getFont(Font original, int pointSize, int style)
GraphicsBackendgetFont in interface GraphicsBackend<AbstractImageGraphicsItem>original - The original base fontpointSize - The point sizestyle - The style constant, as given by the constants in Font.public AbstractImageGraphicsItem group()
GraphicsBackendgroup in interface GraphicsBackend<AbstractImageGraphicsItem>public AbstractImageGraphicsItem makeLabel(String label, Point2D pos, GraphicsBackend.Font font, Color color, GraphicsBackend.Alignment alignment, Shape shape)
GraphicsBackendmakeLabel in interface GraphicsBackend<AbstractImageGraphicsItem>label - The label string.pos - The label position.font - Font to be used for rendering.color - The text color.alignment - Alignment of the label string with regard to pos.shape - The shape surrounding the label string (border, background color)public AbstractImageGraphicsItem makeLines(Collection<Line2D> lines, Color color, Stroke stroke)
makeLines in interface GraphicsBackend<AbstractImageGraphicsItem>Copyright © 2021 Corpuslinguistic working group Humboldt University Berlin. All rights reserved.