public class SVGStyle extends Object
Modifier and Type | Field and Description |
---|---|
protected Float |
alphaValue |
static short |
CSS_FONT_STYLE_ITALIC |
static short |
CSS_FONT_STYLE_NORMAL |
static short |
CSS_FONT_STYLE_OBLIQUE |
static short |
CSS_FONT_WEIGHT_100 |
static short |
CSS_FONT_WEIGHT_200 |
static short |
CSS_FONT_WEIGHT_300 |
static short |
CSS_FONT_WEIGHT_400 |
static short |
CSS_FONT_WEIGHT_500 |
static short |
CSS_FONT_WEIGHT_600 |
static short |
CSS_FONT_WEIGHT_700 |
static short |
CSS_FONT_WEIGHT_800 |
static short |
CSS_FONT_WEIGHT_900 |
static short |
CSS_FONT_WEIGHT_BOLD |
static short |
CSS_FONT_WEIGHT_BOLDER |
static short |
CSS_FONT_WEIGHT_LIGHTER |
static short |
CSS_FONT_WEIGHT_NORMAL |
protected Color |
fillColor |
protected boolean |
fillColorDefined |
protected String |
font_family |
protected String |
font_size |
protected String |
font_style |
protected String |
font_weight |
protected Color |
strokeColor |
protected boolean |
strokeColorDefined |
protected float[] |
strokeDashArray |
protected Float |
strokeWidth |
Constructor and Description |
---|
SVGStyle() |
SVGStyle(Color c1,
Color c2)
Fill color, then stroke/border color.
|
SVGStyle(Color c1,
Color c2,
Float a)
Fill color, then stroke/border color, then transparency.
|
Modifier and Type | Method and Description |
---|---|
float |
getAlphaTransparencyValue()
Get alpha transparency value.
|
Color |
getFillColor()
Get fill (interior) color.
|
Color |
getStrokeColor()
Returns the stroke color.
|
float[] |
getStrokeDashArray()
Get stroke pattern.
|
Float |
getStrokeWidth()
Get stroke width.
|
boolean |
hasFillColorInformation()
Has fill information been declared.
|
boolean |
hasStrokeColorInformation()
Has stroke information been declared.
|
boolean |
hasStylingInformation()
Returns true if there is information about at least one styling attribute.
|
boolean |
hasTransparencyInformation()
Has transparency information been declared.
|
boolean |
requiresSpecialStroke() |
void |
setAlphaTransparencyValue(Float f)
Set alpha transparency value.
|
void |
setFillColor(Color c)
Set fill (interior) color.
|
void |
setFontFamily(String family) |
void |
setFontSize(String size) |
void |
setFontStyle(String style) |
void |
setFontWeight(String weight) |
void |
setStrokeColor(Color c)
Set the stroke (border) color.
|
void |
setStrokeDashArray(String dashArray)
Set stroke pattern.
|
void |
setStrokeWidth(String width)
Set stroke width.
|
public static short CSS_FONT_WEIGHT_NORMAL
public static short CSS_FONT_WEIGHT_BOLD
public static short CSS_FONT_WEIGHT_BOLDER
public static short CSS_FONT_WEIGHT_LIGHTER
public static short CSS_FONT_WEIGHT_100
public static short CSS_FONT_WEIGHT_200
public static short CSS_FONT_WEIGHT_300
public static short CSS_FONT_WEIGHT_400
public static short CSS_FONT_WEIGHT_500
public static short CSS_FONT_WEIGHT_600
public static short CSS_FONT_WEIGHT_700
public static short CSS_FONT_WEIGHT_800
public static short CSS_FONT_WEIGHT_900
public static short CSS_FONT_STYLE_NORMAL
public static short CSS_FONT_STYLE_ITALIC
public static short CSS_FONT_STYLE_OBLIQUE
protected Color fillColor
protected Color strokeColor
protected boolean fillColorDefined
protected boolean strokeColorDefined
protected Float strokeWidth
protected float[] strokeDashArray
protected Float alphaValue
protected String font_family
protected String font_size
protected String font_weight
protected String font_style
public boolean hasStylingInformation()
public boolean hasTransparencyInformation()
public void setFillColor(Color c)
public Color getFillColor()
public boolean hasFillColorInformation()
public void setStrokeColor(Color c)
public Color getStrokeColor()
public boolean hasStrokeColorInformation()
public void setAlphaTransparencyValue(Float f)
f
- alpha value in [0,1f]. 1.0 if opaque, 0 is fully transparent.public float getAlphaTransparencyValue()
public void setStrokeWidth(String width)
public Float getStrokeWidth()
public void setStrokeDashArray(String dashArray)
public float[] getStrokeDashArray()
public boolean requiresSpecialStroke()
public void setFontFamily(String family)
public void setFontSize(String size)
public void setFontWeight(String weight)
public void setFontStyle(String style)
Copyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.