Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.graphics.sld
Class Mark

    java.lang.Object
      org.deegree.graphics.sld.Mark

All Implemented Interfaces:
  Marshallable

    public class Mark

extends Object
implements Marshallable

A Mark takes a "shape" and applies coloring to it. The shape can be derived either from a well-known name (such as "square"), an external URL in various formats (such as, perhaps GIF), or from a glyph of a font. Multiple external formats may be used with the semantic that they all contain the equivalent shape in different formats. If an image format is used that has inherent coloring, the coloring is discarded and only the opacity channel (or equivalent) is used. A Halo, Fill, and/or Stroke is applied as appropriate for the shape's source format.

Version:
  $Revision: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
  Katharina Lupp , Markus Schneider

Constructor Summary
`Mark()` Constructor for the default `Mark`.
`Mark(String wellKnownName, Stroke stroke, Fill fill)` constructor initializing the class with the

Method Summary
`BufferedImage` | `drawCircle(int size, double fillOpacity, Color fillColor, double strokeOpacity, Color strokeColor, float[] dash, float dashOffset, float width, int cap, int join)` Draws a scaled instance of a circle mark according to the given parameters.
`BufferedImage` | `drawCross1(int size, double strokeOpacity, Color strokeColor, float[] dash, float dashOffset, float width, int cap, int join)` Draws a scaled instance of a cross mark (a "+") according to the given parameters.
`BufferedImage` | `drawCross2(int size, double strokeOpacity, Color strokeColor, float[] dash, float dashOffset, float width, int cap, int join)` Draws a scaled instance of a cross mark (an "X") according to the given parameters.
`BufferedImage` | `drawSquare(int size, double fillOpacity, Color fillColor, double strokeOpacity, Color strokeColor, float[] dash, float dashOffset, float width, int cap, int join)` Draws a scaled instance of a square mark according to the given parameters.
`BufferedImage` | `drawStar(int size, double fillOpacity, Color fillColor, double strokeOpacity, Color strokeColor, float[] dash, float dashOffset, float width, int cap, int join)` Draws a five-pointed star (pentagram) according to the given parameters.
`BufferedImage` | `drawTriangle(int size, double fillOpacity, Color fillColor, double strokeOpacity, Color strokeColor, float[] dash, float dashOffset, float width, int cap, int join)` Draws a scaled instance of a triangle mark according to the given parameters.
`String` | `exportAsXML()` exports the content of the Mark as XML formated String
`BufferedImage` | `getAsImage(Feature feature, int size)` Draws the given feature on the buffered image.
`Fill` | `getFill()` A Fill allows area geometries to be filled.
`Stroke` | `getStroke()` A Stroke allows a string of line segments (or any linear geometry) to be rendered.
`String` | `getWellKnownName()` Gives the well known name of a Mark's shape.
`void` | `setAsImage(BufferedImage bufferedImage)` Sets the mark as an image.
`void` | `setFill(Fill fill)` sets the
`void` | `setStroke(Stroke stroke)` sets
`void` | `setWellKnownName(String wellKnownName)` Sets the well known name of a Mark's shape.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Mark

    Mark()

  Constructor for the default `Mark`.

### Mark

    Mark(String wellKnownName,
         Stroke stroke,
         Fill fill)

  constructor initializing the class with the

  Parameters:
    `wellKnownName` -
    `stroke` -
    `fill` -

Method Detail

### getWellKnownName

    public String getWellKnownName()

  Gives the well known name of a Mark's shape. 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. Renderings of these marks may be made solid or hollow depending on Fill and Stroke parameters. The default value is "square".

  Returns:
    the WK-Name of the mark

### setWellKnownName

    public void setWellKnownName(String wellKnownName)

  Sets the well known name of a Mark's shape. 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. Renderings of these marks may be made solid or hollow depending on Fill and Stroke parameters. The default value is "square".

  Parameters:
    `wellKnownName` - the WK-Name of the mark

### getFill

    public Fill getFill()

  A Fill allows area geometries to be filled. There are two types of fills: solid-color and repeated GraphicFill. In general, if a Fill element is omitted in its containing element, no fill will be rendered. The default is a solid 50%-gray (color "#808080") opaque fill.

  Returns:
    the fill of the mark

### setFill

    public void setFill(Fill fill)

  sets the

  Parameters:
    `fill` - the fill of the mark

### getStroke

    public Stroke getStroke()

  A Stroke allows a string of line segments (or any linear geometry) to be rendered. There are three basic types of strokes: solid Color, GraphicFill (stipple), and repeated GraphicStroke. A repeated graphic is plotted linearly and has its graphic symbol bended around the curves of the line string. The default is a solid black line (Color "#000000").

  Returns:
    the stroke of the mark

### setStroke

    public void setStroke(Stroke stroke)

  sets

  Parameters:
    `stroke` - the stroke of the mark

### getAsImage

    public BufferedImage getAsImage(Feature feature,
                                    int size)
                             throws FilterEvaluationException

  Draws the given feature on the buffered image. The drawing values are used from the 'Fill' object (if set). or white as a default fill color and black as a stroke color. If the stroke is null the BasicStroke values (CAP_ROUND, JOIN_ROUND) will be used.

  Be careful to set the buffered image first!.

  Parameters:
    `feature` -
    `size` - DOCUMENT ME!
  Returns:
    The feature as a buffered image with a the 'Fill' values. or white as a default fill color and black as a stroke color.
  Throws:
    `FilterEvaluationException`

### setAsImage

    public void setAsImage(BufferedImage bufferedImage)

  Sets the mark as an image. RThis method is not part of the sld specifications but it is added to speed up applications.

  Parameters:
    `bufferedImage` - the bufferedImage to be set for the mark

### drawTriangle

    public BufferedImage drawTriangle(int size,
                                      double fillOpacity,
                                      Color fillColor,
                                      double strokeOpacity,
                                      Color strokeColor,
                                      float[] dash,
                                      float dashOffset,
                                      float width,
                                      int cap,
                                      int join)

  Draws a scaled instance of a triangle mark according to the given parameters.

  Parameters:
    `size` - resulting image's height and width
    `fillOpacity` - opacity value for the filled parts of the image
    `fillColor` - `Color` to be used for the fill
    `strokeOpacity` - opacity value for the stroked parts of the image
    `strokeColor` - `Color` to be used for the strokes
    `dash` - dash array for rendering boundary line
    `width` - of the boundary line
    `cap` - of the boundary line
    `join` - of the boundary line
    `dashOffset` -
  Returns:
    image displaying a triangle

### drawStar

    public BufferedImage drawStar(int size,
                                  double fillOpacity,
                                  Color fillColor,
                                  double strokeOpacity,
                                  Color strokeColor,
                                  float[] dash,
                                  float dashOffset,
                                  float width,
                                  int cap,
                                  int join)

  Draws a five-pointed star (pentagram) according to the given parameters.

  Parameters:
    `size` - resulting image's height and width
    `fillOpacity` - opacity value for the filled parts of the image
    `fillColor` - `Color` to be used for the fill
    `strokeOpacity` - opacity value for the stroked parts of the image
    `strokeColor` - `Color` to be used for the strokes
    `dash` - dash array for rendering boundary line
    `width` - of the boundary line
    `cap` - of the boundary line
    `join` - of the boundary line
    `dashOffset` -
  Returns:
    an image of a pentagram

### drawCircle

    public BufferedImage drawCircle(int size,
                                    double fillOpacity,
                                    Color fillColor,
                                    double strokeOpacity,
                                    Color strokeColor,
                                    float[] dash,
                                    float dashOffset,
                                    float width,
                                    int cap,
                                    int join)

  Draws a scaled instance of a circle mark according to the given parameters.

  Parameters:
    `size` - resulting image's height and widthh
    `fillOpacity` - opacity value for the filled parts of the image
    `fillColor` - `Color` to be used for the fill
    `strokeOpacity` - opacity value for the stroked parts of the image
    `strokeColor` - `Color` to be used for the strokes
    `dash` - dash array for rendering boundary line
    `width` - of the boundary line
    `cap` - of the boundary line
    `join` - of the boundary line
    `dashOffset` -
  Returns:
    image displaying a circle

### drawSquare

    public BufferedImage drawSquare(int size,
                                    double fillOpacity,
                                    Color fillColor,
                                    double strokeOpacity,
                                    Color strokeColor,
                                    float[] dash,
                                    float dashOffset,
                                    float width,
                                    int cap,
                                    int join)

  Draws a scaled instance of a square mark according to the given parameters.

  Parameters:
    `size` - resulting image's height and widthh
    `fillOpacity` - opacity value for the filled parts of the image
    `fillColor` - `Color` to be used for the fill
    `strokeOpacity` - opacity value for the stroked parts of the image
    `strokeColor` - `Color` to be used for the strokes
    `dash` - dash array for rendering boundary line
    `width` - of the boundary line
    `cap` - of the boundary line
    `join` - of the boundary line
    `dashOffset` -
  Returns:
    image displaying a square

### drawCross1

    public BufferedImage drawCross1(int size,
                                    double strokeOpacity,
                                    Color strokeColor,
                                    float[] dash,
                                    float dashOffset,
                                    float width,
                                    int cap,
                                    int join)

  Draws a scaled instance of a cross mark (a "+") according to the given parameters.

  Parameters:
    `size` - resulting image's height and widthh
    `strokeOpacity` - opacity value for the stroked parts of the image
    `strokeColor` - `Color` to be used for the strokes
    `dash` - dash array for rendering boundary line
    `width` - of the boundary line
    `cap` - of the boundary line
    `join` - of the boundary line
    `dashOffset` -
  Returns:
    image displaying a cross (a "+")

### drawCross2

    public BufferedImage drawCross2(int size,
                                    double strokeOpacity,
                                    Color strokeColor,
                                    float[] dash,
                                    float dashOffset,
                                    float width,
                                    int cap,
                                    int join)

  Draws a scaled instance of a cross mark (an "X") according to the given parameters.

  Parameters:
    `size` - resulting image's height and widthh
    `strokeOpacity` - opacity value for the stroked parts of the image
    `strokeColor` - `Color` to be used for the strokes
    `dash` - dash array for rendering boundary line
    `width` - of the boundary line
    `cap` - of the boundary line
    `join` - of the boundary line
    `dashOffset` -
  Returns:
    image displaying a cross (a "X")

### exportAsXML

    public String exportAsXML()

  exports the content of the Mark as XML formated String

  Specified by:
    `exportAsXML` in interface `Marshallable`
  Returns:
    xml representation of the Mark

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org