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 String
private Element
private final Document
private Element
private boolean
private static final String
private final Element
private 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 String
private static final String
private static final String
private static final String
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private static void
appendStyle
(StringBuilder style, String attribute, Object value) private void
applyStateCommands
(List<Command<?>> commands) private boolean
containsGroupCommand
(List<Command<?>> commands) private static String
encodeImage
(BufferedImage bufferedImage, String format) private Element
getClipElement
(Shape clip) private GraphicsState
private Element
getElement
(Image image, double x, double y, double width, double height) private Element
getElement
(Shape shape) private Element
getElement
(String text, double x, double y) private static String
private static String
private static String
private static String
private static String
private String
getStyle
(boolean filled) private String
void
private void
initRoot()
private void
newGroup()
toString()
void
writeTo
(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
-