org.geotools.styling
Interface Fill

All Superinterfaces:
GTComponent
All Known Implementing Classes:
FillImpl

public interface Fill
extends GTComponent

The Fill object encapsulates the graphical-symbolization parameters for areas of geometries.

There are two types of fill: solid-color and repeated graphic fill.

The details of this object are taken from the OGC Styled-Layer Descriptor Report (OGC 02-070) version 1.0.0.:


 <xsd:element name="Fill">
   <xsd:annotation>
     <xsd:documentation>
       A "Fill" specifies the pattern for filling an area geometry.
       The allowed CssParameters are: "fill" (color) and "fill-opacity".
     </xsd:documentation>
   </xsd:annotation>
   <xsd:complexType>
     <xsd:sequence>
       <xsd:element ref="sld:GraphicFill" minOccurs="0"/>
       <xsd:element ref="sld:CssParameter" minOccurs="0"
                    maxOccurs="unbounded"/>
     </xsd:sequence>
   </xsd:complexType>
 </xsd:element>
 

Renderers can use this information when displaying styled features, though it must be remembered that not all renderers will be able to fully represent strokes as set out by this interface. For example, opacity may not be supported.

Notes:

Version:
$Id: Fill.java 18021 2006-02-14 20:36:18Z jdeolive $
Author:
James Macgill, CCG

Field Summary
static Fill DEFAULT
           
static Fill NULL
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 Expression getBackgroundColor()
          This parameter gives the solid color that will be used as a background for a Fill.
 Expression getColor()
          This parameter gives the solid color that will be used for a Fill.
 Graphic getGraphicFill()
          This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.
 Expression getOpacity()
          This specifies the level of translucency to use when rendering the fill.
 void setBackgroundColor(Expression backgroundColor)
          This parameter gives the solid color that will be used as a background for a Fill.
 void setColor(Expression color)
          This parameter gives the solid color that will be used for a Fill.
 void setGraphicFill(Graphic graphicFill)
          This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.
 void setOpacity(Expression opacity)
          This specifies the level of translucency to use when rendering the fill.
 
Methods inherited from interface org.geotools.event.GTComponent
changed, getNote, getParent, removed, setNote
 

Field Detail

DEFAULT

public static final Fill DEFAULT

NULL

public static final Fill NULL
Method Detail

getColor

public Expression getColor()
This parameter gives the solid color that will be used for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexidecimal digits beetween A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks). The default color is defined to be 50% gray ("#808080"). Note: in CSS this parameter is just called Fill and not Color.

Returns:
The color of the Fill encoded as a hexidecimal RGB value.

setColor

public void setColor(Expression color)
This parameter gives the solid color that will be used for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexidecimal digits beetween A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks).

Parameters:
color - solid color that will be used for a Fill

getBackgroundColor

public Expression getBackgroundColor()
This parameter gives the solid color that will be used as a background for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexidecimal digits beetween A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks). The default color is defined to be transparent.

Returns:
The background color of the Fill encoded as a hexidecimal RGB value.

setBackgroundColor

public void setBackgroundColor(Expression backgroundColor)
This parameter gives the solid color that will be used as a background for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexidecimal digits beetween A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks).

Parameters:
backgroundColor - solid color that will be used as a background

getOpacity

public Expression getOpacity()
This specifies the level of translucency to use when rendering the fill.
The value is encoded as a floating-point value between 0.0 and 1.0 with 0.0 representing totally transparent and 1.0 representing totally opaque, with a linear scale of translucency for intermediate values.
For example, "0.65" would represent 65% opacity. The default value is 1.0 (opaque).

Returns:
The opacity of the fill, where 0.0 is completely transparent and 1.0 is completely opaque.

setOpacity

public void setOpacity(Expression opacity)
This specifies the level of translucency to use when rendering the fill.
The value is encoded as a floating-point value between 0.0 and 1.0 with 0.0 representing totally transparent and 1.0 representing totally opaque, with a linear scale of translucency for intermediate values.
For example, "0.65" would represent 65% opacity.

Parameters:
opacity - DOCUMENT ME!

getGraphicFill

public Graphic getGraphicFill()
This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.

Returns:
The graphic to use as a stipple fill. If null then no stipple fill should be used.

setGraphicFill

public void setGraphicFill(Graphic graphicFill)
This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.

Parameters:
graphicFill - DOCUMENT ME!

accept

public void accept(StyleVisitor visitor)


Copyright © GeoTools. All Rights Reserved.