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, graphicFillFields inherited from class LineStyle2D
contour, contourComposite, perpendicularOffset, stroke -
Constructor Summary
Constructors -
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.5Returns the composite for this point symbolfloatThe point symbol x displacementfloatThe point symbol y displacementdoubleReturns the shape rotation, in radiansgetShape()Returns the shape to be used to render the markdoublegetSize()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 booleanvoidsetAnchorPointX(float anchorPointX) Sets the point symbol x anchor, between 0 and 1voidsetAnchorPointY(float anchorPointY) Sets the point symbol y anchor, between 0 and 1voidsetComposite(Composite composite) Sets the composite for this point symbolvoidsetDisplacementX(float displacementX) Sets the point symbol x displacementvoidsetDisplacementY(float displacementY) Sets the point symbol y displacementstatic voidsetMaxMarkSizeEnabled(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)voidsetRotation(double f) Sets the shape rotation, in radiansvoidSets the shape to be used to render the markvoidsetSize(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, setGraphicFillMethods inherited from class LineStyle2D
getContour, getContourComposite, getGraphicStroke, getPerpendicularOffset, getStroke, setContour, setContourComposite, setGraphicStroke, setPerpendicularOffset, setStrokeMethods inherited from class Style
clone, getMaxScale, getMinScale, isScaleInRange, setMinMaxScale
-
Constructor Details
-
MarkStyle2D
public MarkStyle2D()
-
-
Method Details
-
getRotation
public double getRotation()Returns the shape rotation, in radians- Specified by:
getRotationin 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(double f) Sets the shape rotation, in radians- Specified by:
setRotationin 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:
toStringin 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: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
-