public interface SVGTarget extends RenderTarget
This target is used by renderers objects to render a graph to a SVG DOM and uses the Batik library to transcode the SVG DOM in a SVG document.
To allow further document further manipulation the DOM is organized with top
elements. Top elements are nodes
, edges
, node-labels
,
edge-labels
and arrows
and are elements to append
items to. For instance when a node label element is created it should be appended
to the node-label
element instead of directly to the root. Use
the getTopElement()
method to retrieve or create top elements.
Modifier and Type | Field and Description |
---|---|
static String |
SCALE_STROKES
SVG
Boolean property whether to rescale stroke's width/thickness. |
static String |
TOP_ARROWS
Default top element name for arrows
|
static String |
TOP_EDGE_LABELS
Default top element name for edge labels
|
static String |
TOP_EDGE_LABELS_OUTLINE
Default top element name for edge labels outline
|
static String |
TOP_EDGES
Default top element name for edges
|
static String |
TOP_NODE_LABELS
Default top element name for node labels
|
static String |
TOP_NODE_LABELS_OUTLINE
Default top element name for node labels outline
|
static String |
TOP_NODES
Default top element name for nodes
|
G2D_TARGET, PDF_TARGET, SVG_TARGET
Modifier and Type | Method and Description |
---|---|
Element |
createElement(String qualifiedName)
Create a new element
qualifiedName in the document. |
Text |
createTextNode(String data)
Create a new text node with
data in it. |
Document |
getDocument()
Returns the SVG document
|
float |
getScaleRatio()
When
SCALE_STROKES property is true returns
the scale ratio to scale strokes with. |
Element |
getTopElement(String name)
Returns the top element
name in the document. |
String |
toHexString(Color color)
Returns
color in the hex format (e.g. |
static final String SCALE_STROKES
Boolean
property whether to rescale stroke's width/thickness.static final String TOP_NODES
static final String TOP_EDGES
static final String TOP_NODE_LABELS
static final String TOP_NODE_LABELS_OUTLINE
static final String TOP_EDGE_LABELS
static final String TOP_EDGE_LABELS_OUTLINE
static final String TOP_ARROWS
Element createElement(String qualifiedName)
qualifiedName
in the document.qualifiedName
- the name of the elementText createTextNode(String data)
data
in it.data
- the text dataElement getTopElement(String name)
name
in the document. Top elements are
direct children of the root node and help to organize the SVG document (e.g.
all edges in the same parent DOM node). Create the top element if it missing.name
- the top element name to lookupDocument getDocument()
float getScaleRatio()
SCALE_STROKES
property is true
returns
the scale ratio to scale strokes with.Copyright © 2007–2015 Gephi Consortium. All rights reserved.