|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.graphics.sld.Mark_Impl
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.
Field Summary | |
private Fill |
fill
|
private java.awt.image.BufferedImage |
image
|
private Stroke |
stroke
|
private java.lang.String |
wellKnownName
|
Constructor Summary | |
(package private) |
Mark_Impl()
Constructor for the default Mark. |
(package private) |
Mark_Impl(java.lang.String wellKnownName,
Stroke stroke,
Fill fill)
constructor initializing the class with the |
Method Summary | |
java.awt.image.BufferedImage |
drawCircle(int size,
double fillOpacity,
java.awt.Color fillColor,
double strokeOpacity,
java.awt.Color strokeColor)
Draws a scaled instance of a circle mark according to the given parameters. |
java.awt.image.BufferedImage |
drawCross1(int size,
double strokeOpacity,
java.awt.Color strokeColor)
Draws a scaled instance of a cross mark (a "+") according to the given parameters. |
java.awt.image.BufferedImage |
drawCross2(int size,
double strokeOpacity,
java.awt.Color strokeColor)
Draws a scaled instance of a cross mark (an "X") according to the given parameters. |
java.awt.image.BufferedImage |
drawSquare(int size,
double fillOpacity,
java.awt.Color fillColor,
double strokeOpacity,
java.awt.Color strokeColor)
Draws a scaled instance of a square mark according to the given parameters. |
java.awt.image.BufferedImage |
drawTriangle(int size,
double fillOpacity,
java.awt.Color fillColor,
double strokeOpacity,
java.awt.Color strokeColor)
Draws a scaled instance of a triangle mark according to the given parameters. |
java.lang.String |
exportAsXML()
exports the content of the Mark as XML formated String |
java.awt.image.BufferedImage |
getAsImage(Feature feature,
int size)
DOCUMENT ME! |
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. |
java.lang.String |
getWellKnownName()
Gives the well known name of a Mark's shape. |
void |
setAsImage(java.awt.image.BufferedImage bufferedImage)
Sets the mark as an image. |
private void |
setColor(java.awt.Graphics2D g2D,
java.awt.Color color,
double opacity)
|
void |
setFill(Fill fill)
sets the |
void |
setStroke(Stroke stroke)
sets |
void |
setWellKnownName(java.lang.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 |
Field Detail |
private java.awt.image.BufferedImage image
private Fill fill
private java.lang.String wellKnownName
private Stroke stroke
Constructor Detail |
Mark_Impl()
Mark_Impl(java.lang.String wellKnownName, Stroke stroke, Fill fill)
Method Detail |
public java.lang.String getWellKnownName()
getWellKnownName
in interface Mark
public void setWellKnownName(java.lang.String wellKnownName)
setWellKnownName
in interface Mark
wellKnownName
- the WK-Name of the markpublic Fill getFill()
getFill
in interface Mark
public void setFill(Fill fill)
setFill
in interface Mark
fill
- the fill of the markpublic Stroke getStroke()
getStroke
in interface Mark
public void setStroke(Stroke stroke)
setStroke
in interface Mark
stroke
- the stroke of the markpublic java.awt.image.BufferedImage getAsImage(Feature feature, int size) throws FilterEvaluationException
getAsImage
in interface Mark
size
- DOCUMENT ME!
FilterEvaluationException
public void setAsImage(java.awt.image.BufferedImage bufferedImage)
setAsImage
in interface Mark
bufferedImage
- the bufferedImage to be set for the markpublic java.awt.image.BufferedImage drawTriangle(int size, double fillOpacity, java.awt.Color fillColor, double strokeOpacity, java.awt.Color strokeColor)
size
- resulting image's height and widthhfillOpacity
- opacity value for the filled parts of the imagefillColor
- Colorto be used for the fillstrokeOpacity
- opacity value for the stroked parts of the imagestrokeColor
- Colorto be used for the strokes
public java.awt.image.BufferedImage drawCircle(int size, double fillOpacity, java.awt.Color fillColor, double strokeOpacity, java.awt.Color strokeColor)
size
- resulting image's height and widthhfillOpacity
- opacity value for the filled parts of the imagefillColor
- Colorto be used for the fillstrokeOpacity
- opacity value for the stroked parts of the imagestrokeColor
- Colorto be used for the strokes
public java.awt.image.BufferedImage drawSquare(int size, double fillOpacity, java.awt.Color fillColor, double strokeOpacity, java.awt.Color strokeColor)
size
- resulting image's height and widthhfillOpacity
- opacity value for the filled parts of the imagefillColor
- Colorto be used for the fillstrokeOpacity
- opacity value for the stroked parts of the imagestrokeColor
- Colorto be used for the strokes
public java.awt.image.BufferedImage drawCross1(int size, double strokeOpacity, java.awt.Color strokeColor)
size
- resulting image's height and widthhstrokeOpacity
- opacity value for the stroked parts of the imagestrokeColor
- Colorto be used for the strokes
public java.awt.image.BufferedImage drawCross2(int size, double strokeOpacity, java.awt.Color strokeColor)
size
- resulting image's height and widthhstrokeOpacity
- opacity value for the stroked parts of the imagestrokeColor
- Colorto be used for the strokes
private void setColor(java.awt.Graphics2D g2D, java.awt.Color color, double opacity)
g2D
- color
- opacity
- public java.lang.String exportAsXML()
exportAsXML
in interface Marshallable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |