Draw a line and an arrow at the end (zB) of the given line width the specified (CSS-) color and size.
Draw just an arrow head a the end of an imaginary line (zB) of the given line width the specified (CSS-) color and size.
Called before each draw cycle.
This is required for compatibility with other draw classes in the library (like drawgl).
Draw a circle with the specified (CSS-) color and radius.
Note that if the x- and y- scales are different the result will be an ellipse rather than a circle.
Draw a circular arc (section of a circle) with the given CSS color.
Draw a circle handle with the given CSS color.
It is an inherent featur of the handle functions that the drawn elements are not scaled and not
distorted. So even if the user zooms in or changes the aspect ratio, the handles will be drawn
as even shaped circles.
Due to gl compatibility there is a generic 'clear' function required to avoid accessing the context object itself directly.
This function just fills the whole canvas with a single color.
Draw a cross with diagonal axes with given radius, color and lineWidth at the given position.
Note that the x's radius will not be affected by scaling.
Draw a crosshair with given radius and color at the given position.
Note that the crosshair radius will not be affected by scaling.
Draw the given (cubic) bézier curve.
Draw a cubic Bézier curve and and an arrow at the end (endControlPoint) of the given line width the specified (CSS-) color and arrow size.
Draw the given (cubic) Bézier path.
The given path must be an array with n*3+1 vertices, where n is the number of curves in the path:
[ point1, point1_startControl, point2_endControl, point2, point2_startControl, point3_endControl, point3, ... pointN_endControl, pointN ]
Draw a diamond handle (square rotated by 45°) with the given CSS color.
It is an inherent featur of the handle functions that the drawn elements are not scaled and not distorted. So even if the user zooms in or changes the aspect ratio, the handles will be drawn as even shaped diamonds.
Draw a 1x1 dot with the specified (CSS-) color.
Draw an ellipse with the specified (CSS-) color and thw two radii.
Called after each draw cycle.
This is required for compatibility with other draw classes in the library (like drawgl).
Draw a grid of horizontal and vertical lines with the given (CSS-) color.
Draw the given handle and handle point (used to draw interactive Bézier curves).
The colors for this are fixed and cannot be specified.
Draw a handle line (with a light grey).
Draw an image at the given position with the given size.
Note: SVG images may have resizing issues at the moment.Draw a line and an arrow at the end (zB) of the given line with the specified (CSS-) color.
Draw a non-scaling text label at the given absolute position.
Draw the line between the given two points with the specified (CSS-) color.
Draw an SVG-like path given by the specified path data.
Draw the given point with the specified (CSS-) color and radius 3.
Draw a polygon.
The polygon to draw.
Draw a polygon line (alternative function to the polygon).
Draw a raster of crosshairs in the given grid.
This works analogue to the grid() function
Draw a rectangle at the given left upper corner, with, height; and with the specified line width and (CSS-) color.
Set the current drawlib configuration.
This method shouled be called each time the currently drawn Drawable
changes.
Determine the class name for further usage here.
This method shouled be called each time the currently drawn Drawable
changes.
It is used by some libraries for identifying elemente on re-renders.
Draw square at the given center, size and with the specified (CSS-) color.
Note that if the x-scale and the y-scale are different the result will be a rectangle rather than a square.
Draw a square handle with the given CSS color.
It is an inherent featur of the handle functions that the drawn elements are not scaled and not
distorted. So even if the user zooms in or changes the aspect ratio, the handles will be drawn
as even shaped squares.
Draw a text at the given relative position.
The text to draw.
Draw an image at the given position with the given size.
Note: SVG images may have resizing issues at the moment.Draw a line and an arrow at the end (zB) of the given line with the specified (CSS-) color.
Generated using TypeDoc
An interface all drawing libraries must implement to be used with PlotBoilerplate.
The generic type
R
specifies the return-types for all draw functions. Libraries might want to specify their own draw result; for PlotBoilerplatevoid
orany
is fine.Default implementation is
draw
.