org.geotools.renderer.style
Class MarkStyle2D

Object
  extended by Style
      extended by Style2D
          extended by LineStyle2D
              extended by PolygonStyle2D
                  extended by MarkStyle2D

public class MarkStyle2D
extends PolygonStyle2D

Style to represent points as small filled and stroked shapes

Author:
Andrea Aime
Module:
modules/library/render (gt-render.jar)

Field Summary
 
Fields inherited from class PolygonStyle2D
fill, fillComposite, graphicFill
 
Fields inherited from class LineStyle2D
contour, contourComposite, stroke
 
Fields inherited from class Style
maxScale, minScale
 
Constructor Summary
MarkStyle2D()
           
 
Method Summary
 float getRotation()
          Returns the shape rotation, in radians
 Shape getShape()
          Returns the shape to be used to render the mark
 int getSize()
          Returns the size of the shape, in pixels
 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(Shape shape)
          Sets the shape to be used to render the mark
 void setSize(int i)
          Sets the size of the shape, in pixels
 String toString()
          Returns a string representation of this style.
 
Methods inherited from class PolygonStyle2D
getFill, getFillComposite, getGraphicFill, setFill, setFillComposite, setGraphicFill
 
Methods inherited from class LineStyle2D
getContour, getContourComposite, getGraphicStroke, getStroke, setContour, setContourComposite, setGraphicStroke, setStroke
 
Methods inherited from class Style
getMaxScale, getMinScale, isScaleInRange, setMinMaxScale
 
Methods inherited from class 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


getShape

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


getTransformedShape

public 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


setRotation

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

Parameters:
f -

setShape

public void setShape(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 String toString()
Returns a string representation of this style.

Overrides:
toString in class PolygonStyle2D


Copyright © 1996-2010 Geotools. All Rights Reserved.