Package com.esri.arcgisruntime.symbology
Class SymbolAnchor
- java.lang.Object
-
- com.esri.arcgisruntime.symbology.SymbolAnchor
-
public final class SymbolAnchor extends java.lang.Object
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 aMarkerSymbolLayer
, create a new SymbolAnchor and set it on the symbol layer withMarkerSymbolLayer.setAnchor(SymbolAnchor)
.- Since:
- 100.5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SymbolAnchor.PlacementMode
Represents the ways in which symbol anchor values may be specified.
-
Constructor Summary
Constructors Constructor Description SymbolAnchor(double x, double y, SymbolAnchor.PlacementMode placementMode)
Creates a symbol anchor with the given anchor values and placement mode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SymbolAnchor.PlacementMode
getPlacementMode()
Gets the anchor placement mode of the symbol anchor.double
getX()
Gets the x-component of the symbol anchor.double
getY()
Gets the y-component of the symbol anchor.
-
-
-
Constructor Detail
-
SymbolAnchor
public SymbolAnchor(double x, double y, SymbolAnchor.PlacementMode placementMode)
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:
java.lang.IllegalArgumentException
- if placementMode is null- Since:
- 100.5.0
-
-
Method Detail
-
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
public SymbolAnchor.PlacementMode 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
-
-