|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.graphics.sld.Graphic
public class Graphic
A Graphic is a "graphic symbol" with an inherent shape, color, and size. Graphics can either be referenced from an external URL in a common format (such as GIF or SVG) or may be derived from a Mark. Multiple external URLs may be referenced with the semantic that they all provide the same graphic in different formats. The "hot spot" to use for rendering at a point or the start and finish handle points to use for rendering a graphic along a line must either be inherent in the external format or are system- dependent. The default size of an image format (such as GIF) is the inherent size of the image. The default size of a format without an inherent size is 16 pixels in height and the corresponding aspect in width. If a size is specified, the height of the graphic will be scaled to that size and the corresponding aspect will be used for the width. The default if neither an ExternalURL nor a Mark is specified is to use the default Mark with a size of 6 pixels. The size is in pixels and the rotation is in degrees clockwise, with 0 (default) meaning no rotation. In the case that a Graphic is derived from a font-glyph Mark, the Size specified here will be used for the final rendering. Allowed CssParameters are "opacity", "size", and "rotation".
Field Summary | |
---|---|
static double |
OPACITY_DEFAULT
The default Opacity = 1; |
static double |
ROTATION_DEFAULT
The default rotation is 0 |
static double |
SIZE_DEFAULT
The default size is -1 |
Constructor Summary | |
---|---|
protected |
Graphic()
Creates a new Graphic instance based on the default Mark: a square. |
|
Graphic(java.lang.Object[] marksAndExtGraphics,
ParameterValueType opacity,
ParameterValueType size,
ParameterValueType rotation)
Creates a new Graphic instance. |
protected |
Graphic(ParameterValueType opacity,
ParameterValueType size,
ParameterValueType rotation)
Creates a new Graphic instance based on the default Mark: a square. |
Method Summary | |
---|---|
void |
addMarksAndExtGraphic(java.lang.Object object)
Adds an Object to an object-array that enables the access to the stored ExternalGraphic and Mark -instances. |
java.lang.String |
exportAsXML()
exports the content of the Graphic as XML formated String |
java.awt.image.BufferedImage |
getAsImage(Feature feature)
Returns a BufferedImage representing this object. |
java.lang.Object[] |
getMarksAndExtGraphics()
Returns an object-array that enables the access to the stored ExternalGraphic and Mark -instances. |
ParameterValueType |
getOpacity()
returns the ParameterValueType representation of opacity |
double |
getOpacity(Feature feature)
The Opacity element gives the opacity to use for rendering the graphic. |
ParameterValueType |
getRotation()
returns the ParameterValueType representation of rotation |
double |
getRotation(Feature feature)
The Rotation element gives the rotation of a graphic in the clockwise direction about its center point in radian, encoded as a floating- point number. |
ParameterValueType |
getSize()
returns the ParameterValueType representation of size |
double |
getSize(Feature feature)
The Size element gives the absolute size of the graphic in pixels encoded as a floating-point number. |
void |
removeMarksAndExtGraphic(java.lang.Object object)
Removes an Object from an object-array that enables the access to the stored ExternalGraphic and Mark -instances. |
void |
setAsImage(java.awt.image.BufferedImage bufferedImage)
Sets a BufferedImage representing this object. |
void |
setMarksAndExtGraphics(java.lang.Object[] object)
Sets the ExternalGraphic/ Mark-instances that the image will be based on. |
void |
setOpacity(double opacity)
The Opacity element gives the opacity of to use for rendering the graphic. |
void |
setRotation(double rotation)
|
void |
setSize(double size)
|
void |
setSize(ParameterValueType size)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double OPACITY_DEFAULT
public static final double SIZE_DEFAULT
public static final double ROTATION_DEFAULT
Constructor Detail |
---|
public Graphic(java.lang.Object[] marksAndExtGraphics, ParameterValueType opacity, ParameterValueType size, ParameterValueType rotation)
marksAndExtGraphics
- the image will be based upon theseopacity
- opacity that the resulting image will havesize
- image height will be scaled to this value, respecting the proportionsrotation
- image will be rotated clockwise for positive values, negative values result in
anti-clockwise rotationprotected Graphic(ParameterValueType opacity, ParameterValueType size, ParameterValueType rotation)
opacity
- opacity that the resulting image will havesize
- image height will be scaled to this value, respecting the proportionsrotation
- image will be rotated clockwise for positive values, negative values result in
anti-clockwise rotationprotected Graphic()
Method Detail |
---|
public ParameterValueType getOpacity()
public ParameterValueType getRotation()
public ParameterValueType getSize()
public java.lang.Object[] getMarksAndExtGraphics()
public void setMarksAndExtGraphics(java.lang.Object[] object)
object
- to be used as basis for the resulting imagepublic void addMarksAndExtGraphic(java.lang.Object object)
object
- to be used as basis for the resulting imagepublic void removeMarksAndExtGraphic(java.lang.Object object)
object
- to be used as basis for the resulting imagepublic double getOpacity(Feature feature) throws FilterEvaluationException
feature
- specifies the Feature to be used for evaluation of the underlying
'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation fails or the value is invalidpublic void setOpacity(double opacity)
opacity
- Opacity to be set for the graphicpublic double getSize(Feature feature) throws FilterEvaluationException
feature
- specifies the Feature to be used for evaluation of the underlying
'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation fails or the value is invalidpublic void setSize(double size)
size
- size to be set for the graphic
public void setSize(ParameterValueType size)
size
- size as ParameterValueType to be set for the graphic
public double getRotation(Feature feature) throws FilterEvaluationException
feature
- specifies the Feature to be used for evaluation of the underlying
'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation fails or the value is invalidpublic void setRotation(double rotation)
rotation
- rotation to be set for the graphic
public java.awt.image.BufferedImage getAsImage(Feature feature) throws FilterEvaluationException
feature
-
FilterEvaluationException
- if the evaluation failspublic void setAsImage(java.awt.image.BufferedImage bufferedImage)
bufferedImage
- BufferedImage to be setpublic java.lang.String exportAsXML()
exportAsXML
in interface Marshallable
|
deegree 2.5 (2011/06/29 09:44 build-8-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