org.geotools.renderer.style
Class MarkStyle2D

java.lang.Object
  extended byorg.geotools.renderer.style.Style
      extended byorg.geotools.renderer.style.Style2D
          extended byorg.geotools.renderer.style.LineStyle2D
              extended byorg.geotools.renderer.style.PolygonStyle2D
                  extended byorg.geotools.renderer.style.MarkStyle2D

public class MarkStyle2D
extends PolygonStyle2D

Style to represent points as small filled and stroked shapes

Version:
$Id: MarkStyle2D.java 17703 2006-01-23 00:12:44Z desruisseaux $
Author:
Andrea Aime

Field Summary
 
Fields inherited from class org.geotools.renderer.style.PolygonStyle2D
fill, fillComposite
 
Fields inherited from class org.geotools.renderer.style.LineStyle2D
contour, contourComposite, stroke
 
Fields inherited from class org.geotools.renderer.style.Style
maxScale, minScale
 
Constructor Summary
MarkStyle2D()
           
 
Method Summary
 float getRotation()
          Returns the shape rotation, in radians
 java.awt.Shape getShape()
          Returns the shape to be used to render the mark
 int getSize()
          Returns the size of the shape, in pixels
 java.awt.Shape getTransformedShape(float x, float y)
          Returns a shape that can be used to draw the mark at the x, y coordinates with appropriated rotation and size (according to the current style)
 void setRotation(float f)
          Sets the shape rotation, in radians
 void setShape(java.awt.Shape shape)
          Sets the shape to be used to render the mark
 void setSize(int i)
          Sets the size of the shape, in pixels
 java.lang.String toString()
          Returns a string representation of this style.
 
Methods inherited from class org.geotools.renderer.style.PolygonStyle2D
getFill, getFillComposite, setFill, setFillComposite
 
Methods inherited from class org.geotools.renderer.style.LineStyle2D
getContour, getContourComposite, getGraphicStroke, getStroke, setContour, setContourComposite, setGraphicStroke, setStroke
 
Methods inherited from class org.geotools.renderer.style.Style
getMaxScale, getMinScale, isScaleInRange, setMinMaxScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MarkStyle2D

public MarkStyle2D()
Method Detail

getRotation

public float getRotation()
Returns the shape rotation, in radians

Returns:

getShape

public java.awt.Shape getShape()
Returns the shape to be used to render the mark

Returns:

getTransformedShape

public java.awt.Shape getTransformedShape(float x,
                                          float y)
Returns a shape that can be used to draw the mark at the x, y coordinates with appropriated rotation and size (according to the current style)

Parameters:
x - the x coordinate where the mark will be drawn
y - the y coordinate where the mark will be drawn
Returns:
a shape that can be used to draw the mark

getSize

public int getSize()
Returns the size of the shape, in pixels

Returns:

setRotation

public void setRotation(float f)
Sets the shape rotation, in radians

Parameters:
f -

setShape

public void setShape(java.awt.Shape shape)
Sets the shape to be used to render the mark

Parameters:
shape -

setSize

public void setSize(int i)
Sets the size of the shape, in pixels

Parameters:
i -

toString

public java.lang.String toString()
Returns a string representation of this style.

Overrides:
toString in class PolygonStyle2D


Copyright © GeoTools. All Rights Reserved.