Package org.geotools.renderer.style
Class MarkStyle2D
Object
Style
Style2D
LineStyle2D
PolygonStyle2D
MarkStyle2D
- All Implemented Interfaces:
Cloneable
,PointStyle2D
Style to represent points as small filled and stroked shapes
- Author:
- Andrea Aime
-
Field Summary
Fields inherited from class PolygonStyle2D
fill, fillComposite, graphicFill
Fields inherited from class LineStyle2D
contour, contourComposite, perpendicularOffset, stroke
-
Constructor Summary
Constructors -
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.5Returns the composite for this point symbolfloat
The point symbol x displacementfloat
The point symbol y displacementfloat
Returns the shape rotation, in radiansgetShape()
Returns the shape to be used to render the markdouble
getSize()
Returns the size of the shape, in pixelsgetTransformedShape
(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)getTransformedShape
(float x, float y, float baseRotation, float rotation) 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)static boolean
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
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 displacementstatic void
setMaxMarkSizeEnabled
(boolean useMaxMarkSize) When true makes the mark scale itself to size using the max between the original width and height, otherwise it defaults to the mark height (which has been the original behavior of this class)void
setRotation
(float f) Sets the shape rotation, in radiansvoid
Sets the shape to be used to render the markvoid
setSize
(double i) Sets the size of the shape, in pixelstoString()
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, getPerpendicularOffset, getStroke, setContour, setContourComposite, setGraphicStroke, setPerpendicularOffset, setStroke
Methods inherited from class Style
clone, getMaxScale, getMinScale, isScaleInRange, setMinMaxScale
-
Constructor Details
-
MarkStyle2D
public MarkStyle2D()
-
-
Method Details
-
getRotation
public float getRotation()Returns the shape rotation, in radians- Specified by:
getRotation
in interfacePointStyle2D
- Returns:
- shape rotation, in radians
-
getShape
Returns the shape to be used to render the mark -
getTransformedShape
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 drawny
- the y coordinate where the mark will be drawn- Returns:
- a shape that can be used to draw the mark
-
getTransformedShape
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 drawny
- the y coordinate where the mark will be drawnbaseRotation
- a custom rotation that will be applied before offsetsrotation
- the mark rotation- Returns:
- a shape that can be used to draw the mark
-
getSize
public double getSize()Returns the size of the shape, in pixels -
setRotation
public void setRotation(float f) Sets the shape rotation, in radians- Specified by:
setRotation
in interfacePointStyle2D
-
setShape
Sets the shape to be used to render the mark -
setSize
public void setSize(double i) Sets the size of the shape, in pixels -
toString
Returns a string representation of this style.- Overrides:
toString
in classPolygonStyle2D
-
isMaxMarkSizeEnabled
public static boolean isMaxMarkSizeEnabled() -
setMaxMarkSizeEnabled
public static void setMaxMarkSizeEnabled(boolean useMaxMarkSize) When true makes the mark scale itself to size using the max between the original width and height, otherwise it defaults to the mark height (which has been the original behavior of this class)- Since:
- 2.7.3
-
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
-