|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.bridge.PaintServer
public abstract class PaintServer
A collection of utility methods to deliver java.awt.Paint,
java.awt.Stroke objects that could be used to paint a
shape. This class also provides additional methods the deliver SVG
Paint using the ShapePainter interface.
| Field Summary |
|---|
| Fields inherited from interface org.apache.batik.bridge.ErrorConstants |
|---|
ERR_ATTRIBUTE_MISSING, ERR_ATTRIBUTE_VALUE_MALFORMED, ERR_CSS_LENGTH_NEGATIVE, ERR_CSS_URI_BAD_TARGET, ERR_LENGTH_NEGATIVE, ERR_URI_BAD_TARGET, ERR_URI_IMAGE_BROKEN, ERR_URI_IMAGE_INVALID, ERR_URI_IO, ERR_URI_MALFORMED, ERR_URI_REFERENCE_A_DOCUMENT, ERR_URI_UNSECURE, ERR_XLINK_HREF_CIRCULAR_DEPENDENCIES, URI_IMAGE_ERROR |
| Constructor Summary | |
|---|---|
protected |
PaintServer()
No instance of this class is required. |
| Method Summary | |
|---|---|
static Color |
convertCIELabColor(Element e,
CIELabColor c,
float opacity,
BridgeContext ctx)
Returns a Color object that corresponds to the input Paint's CIE Lab color value. |
static Color |
convertColor(Value c,
float opacity)
Converts the given Value and opacity to a Color object. |
static Color |
convertDeviceColor(Element e,
Value srgb,
DeviceColor c,
float opacity,
BridgeContext ctx)
Returns a Color object that corresponds to the input Paint's device-specific color value. |
static ShapePainter |
convertFillAndStroke(Element e,
ShapeNode node,
BridgeContext ctx)
Returns a ShapePainter defined on the specified element and
for the specified shape node, and using the specified bridge
context. |
static Paint |
convertFillPaint(Element filledElement,
GraphicsNode filledNode,
BridgeContext ctx)
Converts for the specified element, its fill paint properties to a Paint object. |
static Color |
convertICCColor(Element e,
ICCColor c,
float opacity,
BridgeContext ctx)
Returns a Color object that corresponds to the input Paint's ICC color value or null if the related color profile could not be used or loaded for any reason. |
static Color |
convertICCNamedColor(Element e,
ICCNamedColor c,
float opacity,
BridgeContext ctx)
Returns a Color object that corresponds to the input Paint's ICC named color value or null if the related color profile could not be used or loaded for any reason. |
static Marker |
convertMarker(Element e,
Value v,
BridgeContext ctx)
Returns a Marker defined on the specified element by
the specified value, and for the specified shape node. |
static ShapePainter |
convertMarkers(Element e,
ShapeNode node,
BridgeContext ctx)
Returns a ShapePainter defined on the specified
element and for the specified shape node. |
static float |
convertOpacity(Value v)
Returns the opacity represented by the specified CSSValue. |
static Paint |
convertPaint(Element paintedElement,
GraphicsNode paintedNode,
Value paintDef,
float opacity,
BridgeContext ctx)
Converts a Paint definition to a concrete java.awt.Paint
instance according to the specified parameters. |
static Color |
convertRGBICCColor(Element paintedElement,
Value colorDef,
Value iccColor,
float opacity,
BridgeContext ctx)
Returns a Color object that corresponds to the input Paint's ICC color value or an RGB color if the related color profile could not be used or loaded for any reason. |
static Stroke |
convertStroke(Element e)
Converts a Stroke object defined on the specified element. |
static float[] |
convertStrokeDasharray(Value v)
Converts the 'stroke-dasharray' property to a list of float number in user units. |
static int |
convertStrokeLinecap(Value v)
Converts the 'linecap' property to the appropriate BasicStroke constant. |
static int |
convertStrokeLinejoin(Value v)
Converts the 'linejoin' property to the appropriate BasicStroke constant. |
static float |
convertStrokeMiterlimit(Value v)
Converts the 'miterlimit' property to the appropriate float number. |
static Paint |
convertStrokePaint(Element strokedElement,
GraphicsNode strokedNode,
BridgeContext ctx)
Converts for the specified element, its stroke paint properties to a Paint object. |
static ShapePainter |
convertStrokePainter(Element e,
ShapeNode node,
BridgeContext ctx)
|
static Paint |
convertURIPaint(Element paintedElement,
GraphicsNode paintedNode,
Value paintDef,
float opacity,
BridgeContext ctx)
Converts a Paint specified as a URI. |
static int |
resolveColorComponent(Value v)
Returns the value of one color component (0 <= result <= 255). |
static Paint |
silentConvertURIPaint(Element paintedElement,
GraphicsNode paintedNode,
Value paintDef,
float opacity,
BridgeContext ctx)
Converts a Paint specified by URI without sending any error. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected PaintServer()
| Method Detail |
|---|
public static ShapePainter convertMarkers(Element e,
ShapeNode node,
BridgeContext ctx)
ShapePainter defined on the specified
element and for the specified shape node.
e - the element with the marker CSS propertiesnode - the shape nodectx - the bridge context
public static Marker convertMarker(Element e,
Value v,
BridgeContext ctx)
Marker defined on the specified element by
the specified value, and for the specified shape node.
e - the painted elementv - the CSS value describing the marker to constructctx - the bridge context
public static ShapePainter convertFillAndStroke(Element e,
ShapeNode node,
BridgeContext ctx)
ShapePainter defined on the specified element and
for the specified shape node, and using the specified bridge
context.
e - the element interested in a shape painternode - the shape nodectx - the bridge context
public static ShapePainter convertStrokePainter(Element e,
ShapeNode node,
BridgeContext ctx)
public static Paint convertStrokePaint(Element strokedElement,
GraphicsNode strokedNode,
BridgeContext ctx)
strokedElement - the element interested in a PaintstrokedNode - the graphics node to strokectx - the bridge context
public static Paint convertFillPaint(Element filledElement,
GraphicsNode filledNode,
BridgeContext ctx)
filledElement - the element interested in a PaintfilledNode - the graphics node to fillctx - the bridge context
public static Paint convertPaint(Element paintedElement,
GraphicsNode paintedNode,
Value paintDef,
float opacity,
BridgeContext ctx)
java.awt.Paint
instance according to the specified parameters.
paintedElement - the element interested in a PaintpaintedNode - the graphics node to paint (objectBoundingBox)paintDef - the paint definitionopacity - the opacity to consider for the Paintctx - the bridge context
public static Paint silentConvertURIPaint(Element paintedElement,
GraphicsNode paintedNode,
Value paintDef,
float opacity,
BridgeContext ctx)
paintedElement - the element interested in a PaintpaintedNode - the graphics node to paint (objectBoundingBox)paintDef - the paint definitionopacity - the opacity to consider for the Paintctx - the bridge context
public static Paint convertURIPaint(Element paintedElement,
GraphicsNode paintedNode,
Value paintDef,
float opacity,
BridgeContext ctx)
paintedElement - the element interested in a PaintpaintedNode - the graphics node to paint (objectBoundingBox)paintDef - the paint definitionopacity - the opacity to consider for the Paintctx - the bridge context
public static Color convertRGBICCColor(Element paintedElement,
Value colorDef,
Value iccColor,
float opacity,
BridgeContext ctx)
paintedElement - the element using the colorcolorDef - the color definitioniccColor - the ICC color definitionopacity - the opacityctx - the bridge context to use
public static Color convertICCColor(Element e,
ICCColor c,
float opacity,
BridgeContext ctx)
e - the element using the colorc - the ICC color definitionopacity - the opacityctx - the bridge context to use
public static Color convertICCNamedColor(Element e,
ICCNamedColor c,
float opacity,
BridgeContext ctx)
e - the element using the colorc - the ICC named color definitionopacity - the opacityctx - the bridge context to use
public static Color convertCIELabColor(Element e,
CIELabColor c,
float opacity,
BridgeContext ctx)
e - the element using the colorc - the CIE Lab color definitionopacity - the opacityctx - the bridge context to use
public static Color convertDeviceColor(Element e,
Value srgb,
DeviceColor c,
float opacity,
BridgeContext ctx)
e - the element using the colorsrgb - the sRGB fallback colorc - the device-specific color definitionopacity - the opacityctx - the bridge context to use
public static Color convertColor(Value c,
float opacity)
c - The CSS color to convert.opacity - The opacity value (0 <= o <= 1).public static Stroke convertStroke(Element e)
Stroke object defined on the specified element.
e - the element on which the stroke is specifiedpublic static float[] convertStrokeDasharray(Value v)
v - the CSS value describing the dasharray propertypublic static float convertStrokeMiterlimit(Value v)
v - the CSS value describing the miterlimit propertypublic static int convertStrokeLinecap(Value v)
v - the CSS value describing the linecap propertypublic static int convertStrokeLinejoin(Value v)
v - the CSS value describing the linejoin propertypublic static int resolveColorComponent(Value v)
v - the value that defines the color componentpublic static float convertOpacity(Value v)
v - the value that represents the opacity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||