Package org.geotools.renderer.style
Class GraphicStyle2D
-
- All Implemented Interfaces:
Cloneable,PointStyle2D
public class GraphicStyle2D extends Style2D implements PointStyle2D
A style class used to depict a point, polygon centroid or line with a small graphic icon- Author:
- Andrea Aime
-
-
Constructor Summary
Constructors Constructor Description GraphicStyle2D(BufferedImage image, float rotation)Creates a new GraphicStyle2D object.GraphicStyle2D(BufferedImage image, float rotation, int border)GraphicStyle2D(BufferedImage image, int border)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetAnchorPointX()The point symbol x anchor, between 0 and 1, defaults to 0.5floatgetAnchorPointY()The point symbol y anchor, between 0 and 1, defaults to 0.5intgetBorder()The actual image size might have been extended with an extra border (usually of one pixel) to preserve antialiasing pixelsCompositegetComposite()Returns the composite for this point symbolfloatgetDisplacementX()The point symbol x displacementfloatgetDisplacementY()The point symbol y displacementBufferedImagegetImage()doublegetRotation()The graphic rotation in radians.voidsetAnchorPointX(float anchorPointX)Sets the point symbol x anchor, between 0 and 1voidsetAnchorPointY(float anchorPointY)Sets the point symbol y anchor, between 0 and 1voidsetBorder(int border)voidsetComposite(Composite composite)Sets the composite for this point symbolvoidsetDisplacementX(float displacementX)Sets the point symbol x displacementvoidsetDisplacementY(float displacementY)Sets the point symbol y displacementvoidsetImage(BufferedImage image)voidsetRotation(double radians)Graphic rotation in radians-
Methods inherited from class Style
clone, getMaxScale, getMinScale, isScaleInRange, setMinMaxScale
-
-
-
-
Constructor Detail
-
GraphicStyle2D
public GraphicStyle2D(BufferedImage image, float rotation)
Creates a new GraphicStyle2D object.- Parameters:
image- The image that will be used to depict the centroid/point/...rotation- The image rotation
-
GraphicStyle2D
public GraphicStyle2D(BufferedImage image, float rotation, int border)
-
GraphicStyle2D
public GraphicStyle2D(BufferedImage image, int border)
-
-
Method Detail
-
getImage
public BufferedImage getImage()
-
getRotation
public double getRotation()
The graphic rotation in radians.- Specified by:
getRotationin interfacePointStyle2D- Returns:
- graphic rotation in radians
-
setImage
public void setImage(BufferedImage image)
- Parameters:
image-
-
setRotation
public void setRotation(double radians)
Graphic rotation in radians- Specified by:
setRotationin interfacePointStyle2D- Parameters:
radians- graphic rotation
-
getBorder
public int getBorder()
The actual image size might have been extended with an extra border (usually of one pixel) to preserve antialiasing pixels
-
setBorder
public void setBorder(int border)
-
getDisplacementX
public float getDisplacementX()
Description copied from interface:PointStyle2DThe point symbol x displacement- Specified by:
getDisplacementXin interfacePointStyle2D
-
setDisplacementX
public void setDisplacementX(float displacementX)
Description copied from interface:PointStyle2DSets the point symbol x displacement- Specified by:
setDisplacementXin interfacePointStyle2D
-
getDisplacementY
public float getDisplacementY()
Description copied from interface:PointStyle2DThe point symbol y displacement- Specified by:
getDisplacementYin interfacePointStyle2D
-
setDisplacementY
public void setDisplacementY(float displacementY)
Description copied from interface:PointStyle2DSets the point symbol y displacement- Specified by:
setDisplacementYin interfacePointStyle2D
-
getAnchorPointX
public float getAnchorPointX()
Description copied from interface:PointStyle2DThe point symbol x anchor, between 0 and 1, defaults to 0.5- Specified by:
getAnchorPointXin interfacePointStyle2D
-
setAnchorPointX
public void setAnchorPointX(float anchorPointX)
Description copied from interface:PointStyle2DSets the point symbol x anchor, between 0 and 1- Specified by:
setAnchorPointXin interfacePointStyle2D
-
getAnchorPointY
public float getAnchorPointY()
Description copied from interface:PointStyle2DThe point symbol y anchor, between 0 and 1, defaults to 0.5- Specified by:
getAnchorPointYin interfacePointStyle2D
-
setAnchorPointY
public void setAnchorPointY(float anchorPointY)
Description copied from interface:PointStyle2DSets the point symbol y anchor, between 0 and 1- Specified by:
setAnchorPointYin interfacePointStyle2D
-
getComposite
public Composite getComposite()
Description copied from interface:PointStyle2DReturns the composite for this point symbol- Specified by:
getCompositein interfacePointStyle2D
-
setComposite
public void setComposite(Composite composite)
Description copied from interface:PointStyle2DSets the composite for this point symbol- Specified by:
setCompositein interfacePointStyle2D
-
-