Class EpsDocument


  • public class EpsDocument
    extends Object
    This represents an EPS document. Several EpsGraphics2D objects may point to the same EpsDocument.
    Copyright 2001-2006 Paul James Mutton, http://www.jibble.org/
    Copyright 2007 Arnaud Blouin
    08/09/07
    Version:
    0.1
    • Field Detail

      • minX

        private float minX
      • minY

        private float minY
      • maxX

        private float maxX
      • maxY

        private float maxY
      • _isClipSet

        private boolean _isClipSet
      • _title

        private String _title
    • Constructor Detail

      • EpsDocument

        public EpsDocument​(String title)
        Constructs an empty EpsDevice.
        Since:
        0.1
      • EpsDocument

        public EpsDocument​(String title,
                           OutputStream outputStream,
                           int minX,
                           int minY,
                           int maxX,
                           int maxY)
                    throws IOException
        Constructs an empty EpsDevice that writes directly to a file. Bounds must be set before use.
        Throws:
        IOException
        Since:
        0.1
    • Method Detail

      • getTitle

        public String getTitle()
        Returns the title of the EPS document.
        Since:
        0.1
      • updateBounds

        public void updateBounds​(double x,
                                 double y)
        Updates the bounds of the current EPS document.
        Since:
        0.1
      • append

        public void append​(EpsGraphics2D g,
                           String line)
        Appends a line to the EpsDocument. A new line character is added to the end of the line when it is added.
        Since:
        0.1
      • write

        public void write​(Writer writer)
                   throws IOException
        Outputs the contents of the EPS document to the specified Writer, complete with headers and bounding box.
        Throws:
        IOException
        Since:
        0.1
      • isClipSet

        public boolean isClipSet()
      • setClipSet

        public void setClipSet​(boolean isClipSet)