001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
005: * (C) 2002, Center for Computational Geography
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation;
010: * version 2.1 of the License.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * Contacts:
018: * UNITED KINGDOM: James Macgill. j.macgill@geog.leeds.ac.uk
019: */
020: package org.geotools.styling;
021:
022: import org.opengis.filter.expression.Expression;
023:
024: /**
025: * A Mark element defines a "shape" which has coloring applied to it.
026: *
027: * <p>
028: * The details of this object are taken from the <a
029: * href="https://portal.opengeospatial.org/files/?artifact_id=1188"> OGC
030: * Styled-Layer Descriptor Report (OGC 02-070) version 1.0.0.</a>:
031: * <pre><code>
032: * <xsd:element name="Mark">
033: * <xsd:annotation>
034: * <xsd:documentation>
035: * A "Mark" specifies a geometric shape and applies coloring to it.
036: * </xsd:documentation>
037: * </xsd:annotation>
038: * <xsd:complexType>
039: * <xsd:sequence>
040: * <xsd:element ref="sld:WellKnownName" minOccurs="0"/>
041: * <xsd:element ref="sld:Fill" minOccurs="0"/>
042: * <xsd:element ref="sld:Stroke" minOccurs="0"/>
043: * </xsd:sequence>
044: * </xsd:complexType>
045: * </xsd:element>
046: * </code></pre>
047: * </p>
048: *
049: * <p>
050: * Renderers can use this information when displaying styled features, though
051: * it must be remembered that not all renderers will be able to fully
052: * represent strokes as set out by this interface. For example, opacity may
053: * not be supported.
054: * </p>
055: *
056: * <p>
057: * Notes:
058: *
059: * <ul>
060: * <li>
061: * The graphical parameters and their values are derived from SVG/CSS2
062: * standards with names and semantics which are as close as possible.
063: * </li>
064: * </ul>
065: * </p>
066: *
067: * @author James Macgill
068: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/styling/Mark.java $
069: * @version $Id: Mark.java 25459 2007-05-08 05:19:25Z jgarnett $
070: */
071: public interface Mark extends Symbol {
072: public static final Mark[] MARKS_EMPTY = new Mark[0];
073:
074: /**
075: * This parameter gives the well-known name of the shape of the mark.<br>
076: * Allowed names include at least "square", "circle", "triangle", "star",
077: * "cross" and "x" though renderers may draw a different symbol instead if
078: * they don't have a shape for all of these.<br>
079: *
080: * @return The well-known name of a shape. The default value is "square".
081: */
082: Expression getWellKnownName();
083:
084: /**
085: * This parameter gives the well-known name of the shape of the mark.<br>
086: * Allowed names include at least "square", "circle", "triangle", "star",
087: * "cross" and "x" though renderers may draw a different symbol instead if
088: * they don't have a shape for all of these.<br>
089: *
090: * @param wellKnownName The well-known name of a shape. The default value
091: * is "square".
092: */
093: void setWellKnownName(Expression wellKnownName);
094:
095: /**
096: * This paramterer defines which stroke style should be used when rendering
097: * the Mark.
098: *
099: * @return The Stroke definition to use when rendering the Mark.
100: */
101: Stroke getStroke();
102:
103: /**
104: * This paramterer defines which stroke style should be used when rendering
105: * the Mark.
106: *
107: * @param stroke The Stroke definition to use when rendering the Mark.
108: */
109: void setStroke(Stroke stroke);
110:
111: /**
112: * This parameter defines which fill style to use when rendering the Mark.
113: *
114: * @return the Fill definition to use when rendering the Mark.
115: */
116: Fill getFill();
117:
118: /**
119: * This parameter defines which fill style to use when rendering the Mark.
120: *
121: * @param fill the Fill definition to use when rendering the Mark.
122: */
123: void setFill(Fill fill);
124:
125: Expression getSize();
126:
127: void setSize(Expression size);
128:
129: Expression getRotation();
130:
131: void setRotation(Expression rotation);
132:
133: void accept(StyleVisitor visitor);
134: }
|