public interface Renderer
GraphicsContext method.| Modifier and Type | Method and Description |
|---|---|
default void |
circlePoint(Vector2D point,
double diameter)
Circles the outline of a point where the
Vector2D is positioned. |
default void |
connectPoints(Collection<Vector2D> vectors)
Connects the points given in the List in order of their appearance with a line.
The line width of the point is determined by the LineWidth (set by GraphicsContext.setLineWidth(double)).
The color is determined by the StrokeColor (set by GraphicsContext.setStroke(Paint)).
|
default void |
dashLineSegment(LineSegment lineSegment,
double... dashes)
Draws the given line segment.
|
default Rectangle |
drawDraggedRectangle(Vector2D firstCorner,
Vector2D secondCorner) |
default void |
drawLine(Line line)
Draws the given line.
|
default void |
drawLineSegment(LineSegment lineSegment)
Draws the given line segment.
|
default void |
drawParabola(Parabola parabola)
Draws the given parabola.
|
default void |
drawParabola(Parabola parabola,
int samplingDepth)
Draws the given parabola.
|
default void |
drawPoint(Vector2D point)
Draws a point (filled circle) where the
Vector2D is positioned. |
default void |
drawPoint(Vector2D point,
double diameter)
Draws a point (filled circle) where the
Vector2D is positioned. |
default void |
drawRectangle(Vector2D firstCorner,
Vector2D secondCorner) |
default void |
drawStraight(Vector2D start,
Vector2D end)
Draws a straight by connecting the given start and end points.
|
default void |
drawTextCenteredOnPoint(String text,
Vector2D center)
Draws the given text centered on the given vector.
|
double |
getDrawingHeight() |
double |
getDrawingWidth() |
javafx.scene.canvas.GraphicsContext |
getGraphicsContext()
Returns the assigned GraphicContext.
|
javafx.scene.canvas.GraphicsContext getGraphicsContext()
double getDrawingWidth()
double getDrawingHeight()
default void drawPoint(Vector2D point, double diameter)
Vector2D is positioned. The point is centered on the vector.GraphicsContext.setFill(Paint)).point - The position of the point.diameter - The diameter of the point.default void drawPoint(Vector2D point)
Vector2D is positioned. The point is centered on the vector.GraphicsContext.setLineWidth(double)).GraphicsContext.setFill(Paint)).point - The position of the point.default void circlePoint(Vector2D point, double diameter)
Vector2D is positioned. The point is centered
on the vector
.GraphicsContext.setFill(Paint)).point - The position of the point.diameter - The diameter of the circle.default void connectPoints(Collection<Vector2D> vectors)
GraphicsContext.setLineWidth(double)).GraphicsContext.setStroke(Paint)).vectors - The points to be connected with a line.default void drawStraight(Vector2D start, Vector2D end)
GraphicsContext.setLineWidth(double)).GraphicsContext.setStroke(Paint)).start - The starting point.end - The ending point.default void drawLineSegment(LineSegment lineSegment)
GraphicsContext.setLineWidth(double)).GraphicsContext.setStroke(Paint)).lineSegment - The line segment.default void dashLineSegment(LineSegment lineSegment, double... dashes)
GraphicsContext.setLineWidth(double)).GraphicsContext.setStroke(Paint)).dashes - An array of finite non negative dash length.lineSegment - The line segment.default void drawLine(Line line)
GraphicsContext.setLineWidth(double)).GraphicsContext.setStroke(Paint)).line - The line.default void drawParabola(Parabola parabola)
GraphicsContext.setLineWidth(double)).GraphicsContext.setStroke(Paint)).parabola - The parabola.default void drawParabola(Parabola parabola, int samplingDepth)
GraphicsContext.setLineWidth(double)).GraphicsContext.setStroke(Paint)).parabola - The parabola.samplingDepth - The number of points that are connected to draw the parabola.default void drawTextCenteredOnPoint(String text, Vector2D center)
GraphicsContext.setFill(Paint)).text - The text to draw.center - The point to center onto.Copyright © 2017. All rights reserved.