Class EpsDocument
java.lang.Object
org.sourceforge.jlibeps.epsgraphics.EpsDocument
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
Copyright 2001-2006 Paul James Mutton, http://www.jibble.org/
Copyright 2007 Arnaud Blouin
08/09/07
- Version:
- 0.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BufferedWriterprivate booleanprivate EpsGraphics2Dprivate StringWriterprivate Stringprivate floatprivate floatprivate floatprivate float -
Constructor Summary
ConstructorsConstructorDescriptionEpsDocument(String title) Constructs an empty EpsDevice.EpsDocument(String title, OutputStream outputStream, int minX, int minY, int maxX, int maxY) Constructs an empty EpsDevice that writes directly to a file. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(EpsGraphics2D g, String line) Appends a line to the EpsDocument.voidclose()voidflush()getTitle()Returns the title of the EPS document.booleanvoidsetClipSet(boolean isClipSet) voidupdateBounds(double x, double y) Updates the bounds of the current EPS document.voidOutputs the contents of the EPS document to the specified Writer, complete with headers and bounding box.private voidwriteFooter(Writer writer)
-
Field Details
-
minX
private float minX -
minY
private float minY -
maxX
private float maxX -
maxY
private float maxY -
_isClipSet
private boolean _isClipSet -
_title
-
_stringWriter
-
_bufferedWriter
-
_lastG
-
-
Constructor Details
-
EpsDocument
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 Details
-
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
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
Outputs the contents of the EPS document to the specified Writer, complete with headers and bounding box.- Throws:
IOException- Since:
- 0.1
-
flush
- Throws:
IOException
-
close
- Throws:
IOException
-
isClipSet
public boolean isClipSet() -
setClipSet
public void setClipSet(boolean isClipSet)
-