public class SvgGradientNode
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SvgGradientNode.GradientUsage |
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CONTINUATION_INDENT |
protected static java.lang.String |
INDENT_UNIT |
protected java.awt.geom.AffineTransform |
mLocalTransform |
protected java.lang.String |
mName |
protected java.awt.geom.AffineTransform |
mStackedTransform |
protected com.android.ide.common.vectordrawable.SvgTree |
mSvgTree |
protected java.util.Map<java.lang.String,java.lang.String> |
mVdAttributesMap |
| Constructor and Description |
|---|
SvgGradientNode(com.android.ide.common.vectordrawable.SvgTree svgTree,
org.w3c.dom.Node node,
java.lang.String nodeName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGradientStop(java.lang.String color,
java.lang.String offset,
java.lang.String opacity) |
protected void |
copyTo(SvgGradientNode newInstance)
We do not copy mSvgLeafNode, boundingBox, or mGradientUsage because they will be set after
copying the SvgGradientNode.
|
protected void |
copyTo(com.android.ide.common.vectordrawable.SvgNode newInstance) |
SvgGradientNode |
deepCopy() |
void |
dumpNode(java.lang.String indent)
Dumps the current node's debug info.
|
void |
fillEmptyAttributes(java.util.Map<java.lang.String,java.lang.String> parentAttributesMap) |
protected void |
fillPresentationAttributes(java.lang.String name,
java.lang.String value) |
protected void |
fillPresentationAttributes(java.lang.String name,
java.lang.String value,
java.util.logging.Logger logger) |
void |
flatten(java.awt.geom.AffineTransform transform) |
java.lang.String |
getAttributeValue(java.lang.String attribute)
Returns a string containing the value of the given attribute.
|
org.w3c.dom.Node |
getDocumentNode() |
java.lang.String |
getName() |
protected com.android.ide.common.vectordrawable.SvgTree |
getTree() |
boolean |
isGroupNode()
Returns true the node is a group node.
|
protected void |
parseLocalTransform(java.lang.String nodeValue) |
void |
setGradientUsage(SvgGradientNode.GradientUsage gradientUsage) |
void |
setSvgLeafNode(com.android.ide.common.vectordrawable.SvgLeafNode mSvgLeafNode) |
void |
transformIfNeeded(java.awt.geom.AffineTransform rootTransform)
Transforms the current Node with the transformation matrix.
|
void |
writeXML(java.io.OutputStreamWriter writer,
boolean inClipPath,
java.lang.String indent)
Writes content of the node into the VectorDrawable's XML file.
|
protected static final java.lang.String INDENT_UNIT
protected static final java.lang.String CONTINUATION_INDENT
protected final java.lang.String mName
protected final com.android.ide.common.vectordrawable.SvgTree mSvgTree
protected final java.util.Map<java.lang.String,java.lang.String> mVdAttributesMap
protected java.awt.geom.AffineTransform mLocalTransform
protected java.awt.geom.AffineTransform mStackedTransform
public SvgGradientNode(com.android.ide.common.vectordrawable.SvgTree svgTree,
org.w3c.dom.Node node,
java.lang.String nodeName)
public SvgGradientNode deepCopy()
public boolean isGroupNode()
protected void copyTo(SvgGradientNode newInstance)
public void dumpNode(java.lang.String indent)
public void transformIfNeeded(java.awt.geom.AffineTransform rootTransform)
public void flatten(java.awt.geom.AffineTransform transform)
public void writeXML(@NonNull
java.io.OutputStreamWriter writer,
boolean inClipPath,
@NonNull
java.lang.String indent)
throws java.io.IOException
writer - the writer to write the group XML element toinClipPath - boolean to flag whether the pathData should be apart of clip-path or notindent - whitespace used for indending output XMLjava.io.IOExceptionpublic void addGradientStop(java.lang.String color,
java.lang.String offset,
java.lang.String opacity)
public void setGradientUsage(SvgGradientNode.GradientUsage gradientUsage)
public void setSvgLeafNode(com.android.ide.common.vectordrawable.SvgLeafNode mSvgLeafNode)
protected void parseLocalTransform(@NonNull
java.lang.String nodeValue)
protected com.android.ide.common.vectordrawable.SvgTree getTree()
public java.lang.String getName()
public org.w3c.dom.Node getDocumentNode()
protected void fillPresentationAttributes(java.lang.String name,
java.lang.String value,
java.util.logging.Logger logger)
protected void fillPresentationAttributes(java.lang.String name,
java.lang.String value)
public void fillEmptyAttributes(java.util.Map<java.lang.String,java.lang.String> parentAttributesMap)
public java.lang.String getAttributeValue(java.lang.String attribute)
protected void copyTo(com.android.ide.common.vectordrawable.SvgNode newInstance)