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 TypeMethodDescriptionfloat
The point symbol x anchor, between 0 and 1, defaults to 0.5float
The point symbol y anchor, between 0 and 1, defaults to 0.5int
The actual image size might have been extended with an extra border (usually of one pixel) to preserve antialiasing pixelsReturns the composite for this point symbolfloat
The point symbol x displacementfloat
The point symbol y displacementgetImage()
float
The graphic rotation in radians.void
setAnchorPointX
(float anchorPointX) Sets the point symbol x anchor, between 0 and 1void
setAnchorPointY
(float anchorPointY) Sets the point symbol y anchor, between 0 and 1void
setBorder
(int border) void
setComposite
(Composite composite) Sets the composite for this point symbolvoid
setDisplacementX
(float displacementX) Sets the point symbol x displacementvoid
setDisplacementY
(float displacementY) Sets the point symbol y displacementvoid
setImage
(BufferedImage image) void
setRotation
(float 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 float getRotation()The graphic rotation in radians.- Specified by:
getRotation
in interfacePointStyle2D
- Returns:
- graphic rotation in radians
-
setImage
- Parameters:
image
-
-
setRotation
public void setRotation(float radians) Graphic rotation in radians- Specified by:
setRotation
in 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:PointStyle2D
The point symbol x displacement- Specified by:
getDisplacementX
in interfacePointStyle2D
-
setDisplacementX
public void setDisplacementX(float displacementX) Description copied from interface:PointStyle2D
Sets the point symbol x displacement- Specified by:
setDisplacementX
in interfacePointStyle2D
-
getDisplacementY
public float getDisplacementY()Description copied from interface:PointStyle2D
The point symbol y displacement- Specified by:
getDisplacementY
in interfacePointStyle2D
-
setDisplacementY
public void setDisplacementY(float displacementY) Description copied from interface:PointStyle2D
Sets the point symbol y displacement- Specified by:
setDisplacementY
in interfacePointStyle2D
-
getAnchorPointX
public float getAnchorPointX()Description copied from interface:PointStyle2D
The point symbol x anchor, between 0 and 1, defaults to 0.5- Specified by:
getAnchorPointX
in interfacePointStyle2D
-
setAnchorPointX
public void setAnchorPointX(float anchorPointX) Description copied from interface:PointStyle2D
Sets the point symbol x anchor, between 0 and 1- Specified by:
setAnchorPointX
in interfacePointStyle2D
-
getAnchorPointY
public float getAnchorPointY()Description copied from interface:PointStyle2D
The point symbol y anchor, between 0 and 1, defaults to 0.5- Specified by:
getAnchorPointY
in interfacePointStyle2D
-
setAnchorPointY
public void setAnchorPointY(float anchorPointY) Description copied from interface:PointStyle2D
Sets the point symbol y anchor, between 0 and 1- Specified by:
setAnchorPointY
in interfacePointStyle2D
-
getComposite
Description copied from interface:PointStyle2D
Returns the composite for this point symbol- Specified by:
getComposite
in interfacePointStyle2D
-
setComposite
Description copied from interface:PointStyle2D
Sets the composite for this point symbol- Specified by:
setComposite
in interfacePointStyle2D
-