public class SVGAttributeTypePaint extends SVGAttributeType<javafx.scene.paint.Paint,Void>
Paint used to color fill and strokes, the default value is Color.TRANSPARENT.| Modifier and Type | Field and Description |
|---|---|
static javafx.scene.paint.Paint |
DEFAULT_VALUE
Determines the default color to use for a
SVGAttributeTypePaint. |
| Constructor and Description |
|---|
SVGAttributeTypePaint(SVGDocumentDataProvider dataProvider)
Creates new instance with a default value of
Color.BLACK. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getIsCurrentColor() |
javafx.scene.paint.Paint |
getValue(SVGShapeBase<?> shape)
Resolves the given data into a paint.
|
javafx.util.Pair<javafx.scene.paint.Paint,Void> |
getValueAndUnit(String text)
This will be called if actual data is present in the css text, this is the case if the cssText is not
SVGAttributeType.INHERIT_INDICATOR or SVGAttributeType.NONE_INDICATOR. |
getDocumentDataProvider, getIsInherited, getIsNone, getUnit, getValue, getValueAndUnit, hasUnit, setText, useDefaultValueequals, getText, hashCodepublic static final javafx.scene.paint.Paint DEFAULT_VALUE
SVGAttributeTypePaint.public SVGAttributeTypePaint(SVGDocumentDataProvider dataProvider)
Color.BLACK.dataProvider - the SVGDocumentDataProvider to use when data is needed.public boolean getIsCurrentColor()
throws SVGException
isCurrentColor.SVGException - when an error occurs during the retrieval of the value.public javafx.util.Pair<javafx.scene.paint.Paint,Void> getValueAndUnit(String text) throws SVGException
SVGAttributeTypeSVGAttributeType.INHERIT_INDICATOR or SVGAttributeType.NONE_INDICATOR.getValueAndUnit in class SVGAttributeType<javafx.scene.paint.Paint,Void>text - cssText which is not equal to SVGAttributeType.INHERIT_INDICATOR or SVGAttributeType.NONE_INDICATOR.Pair which contains the value as the key and the value as the value.SVGException - when any error occurs during the consumption of the given text.public javafx.scene.paint.Paint getValue(SVGShapeBase<?> shape) throws SVGException
SVGGradientBase.shape - the element for which this paint isPaint which represents the colorSVGException - SVGGradientBase that was not found.Copyright © 2016 Saxonia Systems AG. All rights reserved.