Class AbstractCanvas

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Canvas
    Direct Known Subclasses:
    PDFCanvas, PNGCanvas, SVGCanvas

    public abstract class AbstractCanvas
    extends java.lang.Object
    implements Canvas
    Abstract base class for simplified implementation of Canvas classes.
    • Constructor Detail

      • AbstractCanvas

        public AbstractCanvas()
    • Method Detail

      • putTextLines

        public void putTextLines​(java.lang.String[] lines,
                                 double x,
                                 double y,
                                 int fontSize,
                                 double leading)
                          throws java.io.IOException
        Description copied from interface: Canvas
        Adds several lines of text to the graphics.

        The text position refers to the left most point on the baseline of the first text line. Additional lines then follow below.

        Specified by:
        putTextLines in interface Canvas
        Parameters:
        lines - the text lines
        x - x position of the text's start (in mm)
        y - y position of the text's top (in mm)
        fontSize - the font size (in pt)
        leading - additional vertical space between text lines (in mm)
        Throws:
        java.io.IOException - thrown if the graphics cannot be generated