org.apache.batik.svggen

Class SVGColor

public class SVGColor extends AbstractSVGConverter

Utility class that converts a Color object into a set of corresponding SVG attributes.

See Also: DOMTreeManager

Field Summary
static Coloraqua
Predefined CSS colors
static Colorblack
static Colorblue
static Colorfuchsia
static Colorgray
static Colorgreen
static Colorlime
static Colormaroon
static Colornavy
static Colorolive
static Colorpurple
static Colorred
static Colorsilver
static Colorteal
static Colorwhite
static Coloryellow
Constructor Summary
SVGColor(SVGGeneratorContext generatorContext)
Method Summary
SVGDescriptortoSVG(GraphicContext gc)
Converts part or all of the input GraphicContext into a set of attribute/value pairs and related definitions
static SVGPaintDescriptortoSVG(Color color, SVGGeneratorContext gc)
Converts a Color object to a set of two corresponding values: a CSS color string and an opacity value.

Field Detail

aqua

public static final Color aqua
Predefined CSS colors

black

public static final Color black

blue

public static final Color blue

fuchsia

public static final Color fuchsia

gray

public static final Color gray

green

public static final Color green

lime

public static final Color lime

maroon

public static final Color maroon

navy

public static final Color navy

olive

public static final Color olive

purple

public static final Color purple

red

public static final Color red

silver

public static final Color silver

teal

public static final Color teal

white

public static final Color white

yellow

public static final Color yellow

Constructor Detail

SVGColor

public SVGColor(SVGGeneratorContext generatorContext)

Parameters: generatorContext used by converter to handle precision or to create elements.

Method Detail

toSVG

public SVGDescriptor toSVG(GraphicContext gc)
Converts part or all of the input GraphicContext into a set of attribute/value pairs and related definitions

Parameters: gc GraphicContext to be converted

Returns: descriptor of the attributes required to represent some or all of the GraphicContext state, along with the related definitions

See Also: SVGDescriptor

toSVG

public static SVGPaintDescriptor toSVG(Color color, SVGGeneratorContext gc)
Converts a Color object to a set of two corresponding values: a CSS color string and an opacity value.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.