Package org.geotools.api.style
Interface Mark
- All Superinterfaces:
GraphicalSymbol
,Symbol
- All Known Implementing Classes:
MarkImpl
Indicate that one of a few predefined shapes will be drawn at the points of the geometry.
- Since:
- GeoAPI 2.2
- Author:
- Open Geospatial Consortium, Johann Sorel (Geomatys), Chris Dillard (SYS Technologies)
-
Field Summary
FieldsFields inherited from interface GraphicalSymbol
SYMBOLS_EMPTY
Fields inherited from interface Symbol
SYMBOLS_EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(StyleVisitor visitor) calls the visit method of a StyleVisitoraccept
(TraversingStyleVisitor visitor, Object data) The alternative to a WellKnownName is an external mark format.getFill()
Returns the object that indicates how the mark should be filled.Returns the object that indicates how the edges of the mark will be drawn.Returns the expression whose value will indicate the symbol to draw.void
setExternalMark
(ExternalMark externalMark) Mark defined by an external resource.void
This parameter defines which fill style to use when rendering the Mark.void
This paramterer defines which stroke style should be used when rendering the Mark.void
setWellKnownName
(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.
-
Field Details
-
MARKS_EMPTY
-
-
Method Details
-
getWellKnownName
Expression getWellKnownName()Returns the expression whose value will indicate the symbol to draw. The WellKnownName element gives the well-known name of the shape of the mark. Allowed values include at least “square”, “circle”, “triangle”, “star”, “cross”, and “x”, though map servers may draw a different symbol instead if they don't have a shape for all of these. The default WellKnownName is “square”. Renderings of these marks may be made solid or hollow depending on Fill and Stroke elements.if the WellKnowname is null, check the ExternalMark before using the default square symbol.
Both WellKnowName and ExternalMark canot be set, but both can be null. If none are set then the default square symbol is used.
- Returns:
- Expression or null
-
setFill
This parameter defines which fill style to use when rendering the Mark.- Parameters:
fill
- the Fill definition to use when rendering the Mark.
-
getExternalMark
ExternalMark getExternalMark()The alternative to a WellKnownName is an external mark format. SeeExternalMark
for details.Both WellKnowName and ExternalMark cannot be set, but both can be null. If none are set then the default square symbol is used.
- Returns:
- ExternalMark or null
-
setStroke
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()Returns the object that indicates how the mark should be filled. Null means no fill.- Returns:
- Fill or null
-
setWellKnownName
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()Returns the object that indicates how the edges of the mark will be drawn. Null means that the edges will not be drawn at all.- Returns:
- stroke or null
-
accept
calls the visit method of a StyleVisitor- Specified by:
accept
in interfaceGraphicalSymbol
- Specified by:
accept
in interfaceSymbol
- Parameters:
visitor
- the style visitor
-
accept
-
setExternalMark
Mark defined by an external resource.- Parameters:
externalMark
- Indicate an mark defined by an external resource
-