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 float
getAnchorPointX()
The point symbol x anchor, between 0 and 1, defaults to 0.5float
getAnchorPointY()
The point symbol y anchor, between 0 and 1, defaults to 0.5int
getBorder()
The actual image size might have been extended with an extra border (usually of one pixel) to preserve antialiasing pixelsComposite
getComposite()
Returns the composite for this point symbolfloat
getDisplacementX()
The point symbol x displacementfloat
getDisplacementY()
The point symbol y displacementBufferedImage
getImage()
float
getRotation()
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 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 float getRotation()
The graphic rotation in radians.- Specified by:
getRotation
in interfacePointStyle2D
- Returns:
- graphic rotation in radians
-
setImage
public void setImage(BufferedImage image)
- 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
public Composite getComposite()
Description copied from interface:PointStyle2D
Returns the composite for this point symbol- Specified by:
getComposite
in interfacePointStyle2D
-
setComposite
public void setComposite(Composite composite)
Description copied from interface:PointStyle2D
Sets the composite for this point symbol- Specified by:
setComposite
in interfacePointStyle2D
-
-