Package org.geotools.renderer.style
Class GraphicStyle2D
- All Implemented Interfaces:
Cloneable,PointStyle2D
A style class used to depict a point, polygon centroid or line with a small graphic icon
- Author:
- Andrea Aime
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGraphicStyle2D(BufferedImage image, float rotation) Creates a new GraphicStyle2D object.GraphicStyle2D(BufferedImage image, float rotation, int border) GraphicStyle2D(BufferedImage image, int border) -
Method Summary
Modifier and TypeMethodDescriptionfloatThe point symbol x anchor, between 0 and 1, defaults to 0.5floatThe point symbol y anchor, between 0 and 1, defaults to 0.5intThe actual image size might have been extended with an extra border (usually of one pixel) to preserve antialiasing pixelsReturns the composite for this point symbolfloatThe point symbol x displacementfloatThe point symbol y displacementgetImage()doubleThe 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 radiansMethods inherited from class Style
clone, getMaxScale, getMinScale, isScaleInRange, setMinMaxScale
-
Constructor Details
-
GraphicStyle2D
Creates a new GraphicStyle2D object.- Parameters:
image- The image that will be used to depict the centroid/point/...rotation- The image rotation
-
GraphicStyle2D
-
GraphicStyle2D
-
-
Method Details
-
getImage
-
getRotation
public double getRotation()The graphic rotation in radians.- Specified by:
getRotationin interfacePointStyle2D- Returns:
- graphic rotation in radians
-
setImage
- 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
Description copied from interface:PointStyle2DReturns the composite for this point symbol- Specified by:
getCompositein interfacePointStyle2D
-
setComposite
Description copied from interface:PointStyle2DSets the composite for this point symbol- Specified by:
setCompositein interfacePointStyle2D
-