org.geotools.styling
Interface Mark

All Superinterfaces:
org.opengis.style.GraphicalSymbol, org.opengis.style.Mark, Symbol
All Known Subinterfaces:
TextMark
All Known Implementing Classes:
TextMarkImpl

public interface Mark
extends org.opengis.style.Mark, Symbol

A Mark element defines a "shape" which has coloring applied to it.

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


 <xsd:element name="Mark">
   <xsd:annotation>
     <xsd:documentation>
       A "Mark" specifies a geometric shape and applies coloring to it.
     </xsd:documentation>
   </xsd:annotation>
   <xsd:complexType>
     <xsd:sequence>
       <xsd:element ref="sld:WellKnownName" minOccurs="0"/>
       <xsd:element ref="sld:Fill" minOccurs="0"/>
       <xsd:element ref="sld:Stroke" minOccurs="0"/>
     </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: Mark.java 33898 2009-09-13 15:39:05Z jive $
Author:
James Macgill

Field Summary
static Mark[] MARKS_EMPTY
           
 
Fields inherited from interface org.geotools.styling.Symbol
SYMBOLS_EMPTY
 
Method Summary
 void accept(StyleVisitor visitor)
           
 ExternalMark getExternalMark()
          Mark defined by an external resource.
 Fill getFill()
          This parameter defines which fill style to use when rendering the Mark.
 org.opengis.filter.expression.Expression getRotation()
           
 org.opengis.filter.expression.Expression getSize()
           
 Stroke getStroke()
          This paramterer defines which stroke style should be used when rendering the Mark.
 org.opengis.filter.expression.Expression getWellKnownName()
          This parameter gives the well-known name of the shape of the mark.
Allowed names include at least "square", "circle", "triangle", "star", "cross" and "x" though renderers may draw a different symbol instead if they don't have a shape for all of these.
 void setExternalMark(org.opengis.style.ExternalMark externalMark)
          Mark defined by an external resource.
 void setFill(org.opengis.style.Fill fill)
          This parameter defines which fill style to use when rendering the Mark.
 void setRotation(org.opengis.filter.expression.Expression rotation)
           
 void setSize(org.opengis.filter.expression.Expression size)
          Size to display the mark.
 void setStroke(org.opengis.style.Stroke stroke)
          This paramterer defines which stroke style should be used when rendering the Mark.
 void setWellKnownName(org.opengis.filter.expression.Expression wellKnownName)
          This parameter gives the well-known name of the shape of the mark.
Allowed names include at least "square", "circle", "triangle", "star", "cross" and "x" though renderers may draw a different symbol instead if they don't have a shape for all of these.
 
Methods inherited from interface org.opengis.style.Mark
accept
 

Field Detail

MARKS_EMPTY

static final Mark[] MARKS_EMPTY
Method Detail

getWellKnownName

org.opengis.filter.expression.Expression getWellKnownName()
This parameter gives the well-known name of the shape of the mark.
Allowed names include at least "square", "circle", "triangle", "star", "cross" and "x" though renderers may draw a different symbol instead if they don't have a shape for all of these.

Specified by:
getWellKnownName in interface org.opengis.style.Mark
Returns:
The well-known name of a shape. The default value is "square".

setWellKnownName

void setWellKnownName(org.opengis.filter.expression.Expression wellKnownName)
This parameter gives the well-known name of the shape of the mark.
Allowed names include at least "square", "circle", "triangle", "star", "cross" and "x" though renderers may draw a different symbol instead if they don't have a shape for all of these.

Parameters:
wellKnownName - The well-known name of a shape. The default value is "square".

getStroke

Stroke getStroke()
This paramterer defines which stroke style should be used when rendering the Mark.

Specified by:
getStroke in interface org.opengis.style.Mark
Returns:
The Stroke definition to use when rendering the Mark.

setStroke

void setStroke(org.opengis.style.Stroke stroke)
This paramterer defines which stroke style should be used when rendering the Mark.

Parameters:
stroke - The Stroke definition to use when rendering the Mark.

getFill

Fill getFill()
This parameter defines which fill style to use when rendering the Mark.

Specified by:
getFill in interface org.opengis.style.Mark
Returns:
the Fill definition to use when rendering the Mark.

setFill

void setFill(org.opengis.style.Fill fill)
This parameter defines which fill style to use when rendering the Mark.

Parameters:
fill - the Fill definition to use when rendering the Mark.

getSize

org.opengis.filter.expression.Expression getSize()
Returns:
size of mark

setSize

void setSize(org.opengis.filter.expression.Expression size)
Size to display the mark.

If this value is not provided or is Expression.NIL then a default of 16x16 (or the natural size of the image) will be used.

Parameters:
size -

getRotation

org.opengis.filter.expression.Expression getRotation()
Returns:
rotation

setRotation

void setRotation(org.opengis.filter.expression.Expression rotation)
Parameters:
rotation -

getExternalMark

ExternalMark getExternalMark()
Mark defined by an external resource.

Specified by:
getExternalMark in interface org.opengis.style.Mark
Returns:
ExternalMark or null if WellKNownName is being used

setExternalMark

void setExternalMark(org.opengis.style.ExternalMark externalMark)
Mark defined by an external resource.

Parameters:
externalMark - Indicate an mark defined by an external resource

accept

void accept(StyleVisitor visitor)
Specified by:
accept in interface Symbol


Copyright © 1996-2010 Geotools. All Rights Reserved.