Class SVGEntity

  • All Implemented Interfaces:
    java.lang.Cloneable, org.w3c.dom.Element, org.w3c.dom.Node

    public abstract class SVGEntity
    extends XMLElement
    A special case of DXFObjects used for graphical entities. In particular, maintains the affine transformation that can be associated with any graphical element.
    Author:
    jsevy
    • Constructor Detail

      • SVGEntity

        public SVGEntity​(com.jsevy.jsvg.SVGStyle style,
                         java.awt.geom.AffineTransform transform)
    • Method Detail

      • getTransform

        public java.awt.geom.AffineTransform getTransform()
      • setTransform

        public void setTransform​(java.awt.geom.AffineTransform newTransform)
      • getBounds

        public java.awt.geom.Rectangle2D getBounds()
        Returns the rectangle that bounds the shape, i.e., the smallest enclosing rectangle. Note that this takes into account any transformation associated with the shape (rotation, scaling, skewing, etc.), giving the bounding rectangle for the transformed shape.
        Returns:
        Rectangle bounding the shape
      • setPrecisionDigits

        public static void setPrecisionDigits​(int decimalDigits)
        Set the number of digits when a quantity is truncated with a call to setPrecision()
        Parameters:
        decimalDigits - Number of digits following the decimal point, between 0 and 16