java.lang.Object
com.esri.arcgisruntime.symbology.SymbolAnchor
Represents the anchor point of a symbol layer, including placement mode and anchor position values. Instances of this
class are immutable. To change the symbol anchor values on a
MarkerSymbolLayer
, create a new SymbolAnchor
and set it on the symbol layer with MarkerSymbolLayer.setAnchor(SymbolAnchor)
.- Since:
- 100.5.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Represents the ways in which symbol anchor values may be specified. -
Constructor Summary
ConstructorDescriptionSymbolAnchor
(double x, double y, SymbolAnchor.PlacementMode placementMode) Creates a symbol anchor with the given anchor values and placement mode. -
Method Summary
-
Constructor Details
-
SymbolAnchor
Creates a symbol anchor with the given anchor values and placement mode.- Parameters:
x
- the X anchor valuey
- the Y anchor valueplacementMode
- the placement mode- Throws:
IllegalArgumentException
- if placementMode is null- Since:
- 100.5.0
-
-
Method Details
-
getX
public double getX()Gets the x-component of the symbol anchor. The x-component can be any real number. The units of the value depend on theSymbolAnchor.PlacementMode
. The default value is 0, regardless of placement mode.- Returns:
- the x-component
- Since:
- 100.5.0
-
getY
public double getY()Gets the y-component of the symbol anchor. The y-component can be any real number. The units of the value depend on theSymbolAnchor.PlacementMode
. The default value is 0, regardless of placement mode.- Returns:
- the y-component
- Since:
- 100.5.0
-
getPlacementMode
Gets the anchor placement mode of the symbol anchor. The placement mode determines how anchor values are interpreted, seeSymbolAnchor.PlacementMode
for a description of the effects of each mode. The default mode isSymbolAnchor.PlacementMode.RELATIVE
.- Returns:
- the placement mode
- Since:
- 100.5.0
-