A Symbolizer that repeats a pattern. A hatch can be applied to linear and area geometries.
You can create a Hatch by specifying the name, Stroke, and size:
Or with named parameters:def hatch = new Hatch("times", new Stroke("wheat", 1.2, [5,2], "square", "bevel"), 12.2)
def hatch = new Hatch(size: 10, stroke: new Stroke("wheat",1.0), name: "slash")
Fields inherited from class | Fields |
---|---|
class Symbolizer |
filterFactory, styleBuilder, styleFactory, styleOptions |
Type | Name and description |
---|---|
Fill |
fill The Fill |
Expression |
name The name of the pattern (vertline, horline, slash, backslash, plus, times) |
Expression |
size The size |
Stroke |
stroke The Stroke |
Constructor and description |
---|
Hatch
(Map map) Create a new Hatch with named parameters. |
Hatch
(java.lang.Object name, Stroke stroke = new Stroke(, java.lang.Object size = 8) Create a new Hatch. |
Hatch
(java.lang.Object name, Fill fill, Stroke stroke, java.lang.Object size) Create a new Hatch with Fill and Stroke. |
Hatch
(java.lang.Object name, Fill fill, java.lang.Object size) Create a new Hatch with a Fill but no Stroke. |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
apply(Symbolizer sym) Apply this Symbolizer to the GeoTools Symbolizer |
|
protected Graphic |
createHatch() Create a GeoTools Graphic based on this Hatch |
|
protected void |
prepare(Rule rule) Prepare the GeoTools Rule by applying this Symbolizer |
|
void |
setName(java.lang.Object name) Set the name of the pattern (vertline, horline, slash, backslash, plus, times) |
|
void |
setSize(java.lang.Object size) Set the size |
|
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, plus, prepare, prepare, range, range, sortBy, sortBy, where, zindex |
The Fill
The name of the pattern (vertline, horline, slash, backslash, plus, times)
The size
The Stroke
Create a new Hatch with named parameters.
def hatch = new Hatch(size: 10, stroke: new Stroke("wheat",1.0), name: "slash")
map
- A Map of named parameters.Create a new Hatch.
def hatch = new Hatch("times", new Stroke("wheat", 1.2, [5,2], "square", "bevel"), 12.2)
name
- (vertline, horline, slash, backslash, plus, times)stroke
- A Strokesize
- The sizeCreate a new Hatch with Fill and Stroke.
def hatch = new Hatch("times", new Fill("blue"), new Stroke("wheat", 1.2, [5,2], "square", "bevel"), 12.2)
name
- (vertline, horline, slash, backslash, plus, times)fill
- A Fillstroke
- A Strokesize
- The sizeCreate a new Hatch with a Fill but no Stroke.
def hatch = new Hatch("times", new Fill("wheat"), 12.2)
name
- (vertline, horline, slash, backslash, plus, times)fill
- A Fillsize
- The sizeApply this Symbolizer to the GeoTools Symbolizer
sym
- The GeoTools SymbolizerCreate a GeoTools Graphic based on this Hatch
Prepare the GeoTools Rule by applying this Symbolizer
rule
- The GeoTools RuleSet the name of the pattern (vertline, horline, slash, backslash, plus, times)
name
- The name of the pattern (vertline, horline, slash, backslash, plus, times)Set the size
size
- The sizeThe string representation
Groovy Documentation