class Fill extends Symbolizer
A Symbolizer for area/polygonal geometries. It consists of a color and an opacity. You can create a Fill from a color and opacity:
 def fill = new Fill('#ff0000', 0.5)
 def fill = new Fill(color: '#ff0000', opacity: 0.25)
| Fields inherited from class | Fields | 
|---|---|
| class Symbolizer | filterFactory, styleBuilder, styleFactory, styleOptions, title | 
| Type | Name and description | 
|---|---|
| Expression | colorThe Color (#ff0000, red, [0,0.,255]) | 
| Hatch | hatchThe Hatch | 
| Icon | iconThe Icon | 
| Expression | opacityThe opacity (1.0 = opaque to 0.0 = transparent) | 
| Type Params | Return Type | Name and description | 
|---|---|---|
|  | protected void | apply(Symbolizer sym)Apply this Symbolizer to the GeoTools Symbolizer | 
|  | protected Fill | createFill()Create the GeoTools Fill object | 
|  | Fill | hatch(java.lang.String name, Stroke stroke, java.lang.Object size)Compose this Fill with a Hatch pattern. | 
|  | Fill | hatch(java.lang.String name, Fill fill, Stroke stroke, java.lang.Object size)Compose this Fill with a Hatch pattern that has a Fill and Stroke. | 
|  | Fill | hatch(java.lang.String name, Fill fill, java.lang.Object size)Compose this Fill with a Hatch pattern that has a Fill but no Stroke | 
|  | Fill | icon(java.lang.Object url, java.lang.String format)Compose this Fill as an Icon. | 
|  | protected void | prepare(Rule rule)Prepare the GeoTools Rule by applying this Symbolizer | 
|  | Fill | random(Map params)Add randomized fill. | 
|  | void | setColor(java.lang.Object color)Set the color | 
|  | void | setOpacity(java.lang.Object opacity)Set the opacity | 
|  | java.lang.String | toString()The string representation | 
| Methods inherited from class | Name | 
|---|---|
| class Symbolizer | and, apply, asSLD, asSLD, buildString, composite, createGeoToolsSymbolizer, getDefault, getDefault, getGeoToolsSymbolizers, getGtStyle, getSld, getTitle, plus, prepare, prepare, range, range, sortBy, sortBy, title, where, zindex | 
The Color (#ff0000, red, [0,0.,255])
The Hatch
The Icon
The opacity (1.0 = opaque to 0.0 = transparent)
Create a new Fill.
def f = new Fill(color: '#ff0000', opacity: 0.25)
map -  A Map of named parameters.Create a new Fill.
 def f = new Fill('#ff0000', 0.5)
 def f = new Fill('red', 0.5)
 def f = new Fill([255,0,0], 0.5)
 color -  The Coloropacity -  The opacity (1 opaque to 0 transparent)Apply this Symbolizer to the GeoTools Symbolizer
sym -  The GeoTools SymbolizerCreate the GeoTools Fill object
Compose this Fill with a Hatch pattern.
 def f = new Fill().hatch('slash')
 name -  The name of the hatch patternstroke -  The Strokesize -  The sizeCompose this Fill with a Hatch pattern that has a Fill and Stroke.
 def f = new Fill().hatch('slash', new Fill("white"), new Stroke("blue",0.1), 8)
 name -  The name of the hatch patternfill -  The Fillstroke -  The Strokesize -  The sizeCompose this Fill with a Hatch pattern that has a Fill but no Stroke
 def f = new Fill().hatch('slash', new Fill("wheat"), 8)
 name -  The name of the hatch patternfill -  The Fillsize -  The sizeCompose this Fill as an Icon.
 def f = new Fill().icon('icon.png','image/png')
 url -  The URL or File of the imageformat -  The mime type of the image.Prepare the GeoTools Rule by applying this Symbolizer
rule -  The GeoTools RuleAdd randomized fill. See http://osgeo-org.1560.x6.nabble.com/Randomized-fill-landed-on-trunk-td5081889.html for more details.
params -  Named parameters may include:
 Set the color
color -  The color (#ffffff, red)Set the opacity
opacity -  The opacityThe string representation
Groovy Documentation