Class SVGDocument
java.lang.Object
de.erichseifert.vectorgraphics2d.SizedDocument
de.erichseifert.vectorgraphics2d.svg.SVGDocument
- All Implemented Interfaces:
Document
Represents a
Document in the Scaled Vector Graphics (SVG)
format.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate Elementprivate final Documentprivate Elementprivate booleanprivate static final Stringprivate final Elementprivate final Stack<GraphicsState> Mapping of stroke endcap values from Java to SVG.Mapping of line join values for path drawing from Java to SVG.private static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate static voidappendStyle(StringBuilder style, String attribute, Object value) private voidapplyStateCommands(List<Command<?>> commands) private booleancontainsGroupCommand(List<Command<?>> commands) private static StringencodeImage(BufferedImage bufferedImage, String format) private ElementgetClipElement(Shape clip) private GraphicsStateprivate ElementgetElement(Image image, double x, double y, double width, double height) private ElementgetElement(Shape shape) private ElementgetElement(String text, double x, double y) private static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate StringgetStyle(boolean filled) private Stringvoidprivate voidinitRoot()private voidnewGroup()toString()voidwriteTo(OutputStream out) Methods inherited from class de.erichseifert.vectorgraphics2d.SizedDocument
getPageSize, isCompressed
-
Field Details
-
SVG_DOCTYPE_QNAME
- See Also:
-
SVG_DOCTYPE_PUBLIC_ID
- See Also:
-
SVG_DOCTYPE_SYSTEM_ID
- See Also:
-
SVG_NAMESPACE_URI
- See Also:
-
XLINK_NAMESPACE
- See Also:
-
XLINK_NAMESPACE_URI
- See Also:
-
PREFIX_CLIP
- See Also:
-
CHARSET
- See Also:
-
states
-
doc
-
root
-
group
-
groupAdded
private boolean groupAdded -
defs
-
clippingPathElements
-
STROKE_ENDCAPS
Mapping of stroke endcap values from Java to SVG. -
STROKE_LINEJOIN
Mapping of line join values for path drawing from Java to SVG.
-
-
Constructor Details
-
SVGDocument
-
-
Method Details
-
getCurrentState
-
initRoot
private void initRoot() -
writeTo
- Throws:
IOException
-
toString
-
newGroup
private void newGroup() -
getClipElement
-
addToGroup
-
handle
-
applyStateCommands
-
containsGroupCommand
-
getStyle
-
getStyle
-
appendStyle
-
getOutput
-
getOutput
-
getOutput
-
getOutput
-
getOutput
-
encodeImage
-
getElement
-
getElement
-
getElement
-