Class LineSvgNodeRenderer

    • Field Detail

      • x1

        private float x1
      • y1

        private float y1
      • x2

        private float x2
      • y2

        private float y2
    • Constructor Detail

      • LineSvgNodeRenderer

        public LineSvgNodeRenderer()
    • Method Detail

      • doDraw

        public void doDraw​(SvgDrawContext context)
        Description copied from class: AbstractSvgNodeRenderer
        Draws this element to a canvas-like object maintained in the context.
        Specified by:
        doDraw in class AbstractSvgNodeRenderer
        Parameters:
        context - the object that knows the place to draw this element and maintains its state
      • getObjectBoundingBox

        public Rectangle getObjectBoundingBox​(SvgDrawContext context)
        Description copied from interface: ISvgNodeRenderer
        Calculates the current object bounding box.
        Specified by:
        getObjectBoundingBox in interface ISvgNodeRenderer
        Parameters:
        context - the current context, for instance it contains current viewport and available font data
        Returns:
        the Rectangle representing the current object's bounding box, or null if bounding box is undefined
      • getAttribute

        float getAttribute​(java.util.Map<java.lang.String,​java.lang.String> attributes,
                           java.lang.String key)
      • drawMarker

        public void drawMarker​(SvgDrawContext context,
                               MarkerVertexType markerVertexType)
        Description copied from interface: IMarkerCapable
        Draws a marker in the specified context. The marker is drawn on the vertices defined according to the given marker type.
        Specified by:
        drawMarker in interface IMarkerCapable
        Parameters:
        context - the object that knows the place to draw this element and maintains its state
        markerVertexType - type of marker that determine on which vertices of the given element marker should be drawn
      • getAutoOrientAngle

        public double getAutoOrientAngle​(MarkerSvgNodeRenderer marker,
                                         boolean reverse)
        Description copied from interface: IMarkerCapable
        Calculates marker orientation angle if orient attribute is set to auto
        Specified by:
        getAutoOrientAngle in interface IMarkerCapable
        Parameters:
        marker - marker for which the rotation angle should be calculated
        reverse - indicates that the resulting angle should be rotated 180 degrees
        Returns:
        marker orientation angle so that its positive x-axis is pointing in the direction of the path at the point it is placed
      • setParameters

        private boolean setParameters​(SvgDrawContext context)