public class OMSVGPaint extends OMSVGColor
OMSVGPaint
interface corresponds to
basic type <paint> and
represents the values of properties fill
and stroke
.
Note: The OMSVGPaint
interface is deprecated,
and may be dropped from future versions of the SVG specification.
Modifier and Type | Field and Description |
---|---|
static short |
SVG_PAINTTYPE_CURRENTCOLOR
Corresponds to a currentColor value on
a <paint> specification.
|
static short |
SVG_PAINTTYPE_NONE
Corresponds to a none value on a <paint>
specification.
|
static short |
SVG_PAINTTYPE_RGBCOLOR
An sRGB color has been specified without an alterICC color specification.
|
static short |
SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR
An sRGB color has been specified along with an alterICC color specification.
|
static short |
SVG_PAINTTYPE_UNKNOWN
The paint type is not one of predefined types.
|
static short |
SVG_PAINTTYPE_URI
Only a URI has been specified.
|
static short |
SVG_PAINTTYPE_URI_CURRENTCOLOR
A URI has been specified, along with an sRGB color as the backup paint
method in case the URI is unavailable or invalid.
|
static short |
SVG_PAINTTYPE_URI_NONE
A URI has been specified, along with an explicit none
as the backup paint method in case the URI is unavailable or invalid.
|
static short |
SVG_PAINTTYPE_URI_RGBCOLOR
A URI has been specified, along with an sRGB color as the backup paint
method in case the URI is unavailable or invalid.
|
static short |
SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR
A URI has been specified, along with both an sRGB color and alternate ICC
color as the backup paint method in case the URI is unavailable or invalid.
|
colorType, iccColor, rgbColor, SVG_COLORTYPE_CURRENTCOLOR, SVG_COLORTYPE_RGBCOLOR, SVG_COLORTYPE_RGBCOLOR_ICCCOLOR, SVG_COLORTYPE_UNKNOWN
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST, cssText, cssValueType
Constructor and Description |
---|
OMSVGPaint(short paintType) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getDescription() |
short |
getPaintType()
The type of paint, identified by one of the SVG_PAINTTYPE_ constants defined
on this interface.
|
String |
getUri()
When the
getPaintType() specifies
a URI, this attribute holds the URI string. |
int |
hashCode() |
void |
setPaint(short paintType,
String uri,
String rgbColor,
String iccColor)
Sets the paint as specified by the parameters.
|
void |
setUri(String uri)
Sets the
getPaintType() to SVG_PAINTTYPE_URI_NONE
and sets getUri() to the specified
value. |
getColorType, getIccColor, getRgbColor, setColor, setRGBColor, setRGBColorICCColor
getCssText, getCssValueType, setCssText, toString
public static final short SVG_PAINTTYPE_UNKNOWN
public static final short SVG_PAINTTYPE_RGBCOLOR
public static final short SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR
public static final short SVG_PAINTTYPE_NONE
public static final short SVG_PAINTTYPE_CURRENTCOLOR
public static final short SVG_PAINTTYPE_URI_NONE
public static final short SVG_PAINTTYPE_URI_CURRENTCOLOR
public static final short SVG_PAINTTYPE_URI_RGBCOLOR
public static final short SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR
public static final short SVG_PAINTTYPE_URI
public final short getPaintType()
public final String getUri()
getPaintType()
specifies
a URI, this attribute holds the URI string. When the getPaintType()
does not specify a URI, this attribute is null.public final void setUri(String uri)
getPaintType()
to SVG_PAINTTYPE_URI_NONE
and sets getUri()
to the specified
value.uri
- The URI for the desired paint server.public final void setPaint(short paintType, String uri, String rgbColor, String iccColor) throws com.google.gwt.core.client.JavaScriptException
RGBColor
,
then rgbColor must be a string that matches <color>;
otherwise, rgbColor must be null. If paintType requires
an OMSVGICCColor
, then iccColor
must be a string that matches <icccolor>;
otherwise, iccColor must be null.paintType
- One of the defined constants for getPaintType()
.uri
- The URI for the desired paint server, or null.rgbColor
- The specification of an sRGB color, or null.iccColor
- The specification of an ICC color, or null.SVGException(SVG_INVALID_VALUE_ERR)
- Raised if one of the parameters
has an invalid value.com.google.gwt.core.client.JavaScriptException
public String getDescription()
getDescription
in class OMCSSValue
Copyright © 2018. All Rights Reserved.