Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DrawingContext

Describes the content of a drawing with the help of various drawing commands.

Hierarchy

  • DrawingContext

Implemented by

Index

Methods

close

  • close(): void
  • Finalizes the drawing which this drawing context belongs to.

    Returns void

drawDrawing

  • Draws the specified Drawing into the current drawing context. To set the position and size of the drawing, use the pushTransform function. The drawing can be easily aligned with the settings parameter.

    Parameters

    Returns void

drawEllipse

  • Draws an ellipse around the point center and fills it with the brush which has been previously set using the setBrush function, and strokes it using the pen which has been previously set with the setPen function. In case you want to draw a larger number of ellipses (e.g. points), consider using the drawGeometry function with a GeometryGroup, containing multiple EllipseGeometry objects to improve the drawing performance.

    Parameters

    Returns void

drawGeometry

  • Draws the specified Geometry and fills it with the brush which has been previously set using the setBrush function, and strokes it using the pen which has been previously set with the setPen function. In case you want to draw a larger number of geometries, consider creating a GeometryGroup, containing multiple Geometry objects to improve the drawing performance. The geometry can be easily aligned with the settings parameter.

    Parameters

    Returns void

drawImage

drawLine

  • Draws a line using from start to end using the pen which has been previously set with the setPen function. In case you want to draw a larger number of lines, consider using the drawLines or drawGeometry function to improve the drawing performance.

    Parameters

    Returns void

drawLines

  • Draws multiple lines that are not connected using the pen which has been previously set with the setPen function. The number of points provided as parameter lines must be even. Each two points describe a line. In case you want to draw connected points, please consider using the function drawGeometry instead of using the drawLines function with duplicate points.

    Parameters

    Returns void

drawRectangle

  • drawRectangle(x: number, y: number, w: number, h: number): void
  • Draws a rectangle with of width w and height h at Point x;y and fills it with the brush which has been previously set using the setBrush function, and strokes it using the pen which has been previously set with the setPen function. In case you want to draw a larger number of rectangles, consider using the drawGeometry function with a GeometryGroup, containing multiple RectangleGeometry objects to improve the drawing performance.

    Parameters

    • x: number
    • y: number
    • w: number
    • h: number

    Returns void

drawText

noBrush

  • noBrush(): void

noPen

  • noPen(): void

placeHighlight

  • Places a highlight on the plot. The final position and alignment will be determined by the current transformation stack. Highlights associated with measurement values will be shown if the associated measurement is activated by interactive elements in a report. Highlights can also be associated with tooltips can be selected by the user and will be displayed in PiWeb Monitor.

    Parameters

    Returns void

pop

  • pop(): void
  • Removes the most recent effect caused by pushTransform, pushOpacity or pushClip from the stack. This function will cause an error in case none of the specified commands has been executed before.

    Returns void

pushClip

  • Sets a new clip geometry. All subsequent drawing calls will only be rendered inside the fill area of the specified geometry. Be aware that unfilled geometries like straight lines don't have any fill area, which means that all subsequent drawing calls have no effect. To undo it, use the pop function.

    Parameters

    Returns void

pushOpacity

  • pushOpacity(opacity: number): void
  • Sets the opacity of all subsequent drawing calls. When drawing transparent objects, the transparency of the object is multiplied with the specified opacity. To undo it, use the pop function.

    Parameters

    • opacity: number

    Returns void

pushTransform

  • Multiplies the current transformation matrix with another Transform. To undo it, use the pop function.

    Parameters

    Returns void

setBrush

setPen

Generated using TypeDoc