Class SymbolAnchor

java.lang.Object
com.esri.arcgisruntime.symbology.SymbolAnchor

public final class SymbolAnchor extends 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 a MarkerSymbolLayer, create a new SymbolAnchor and set it on the symbol layer with MarkerSymbolLayer.setAnchor(SymbolAnchor).
Since:
100.5.0
  • Constructor Details

    • 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 value
      y - the Y anchor value
      placementMode - 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 the SymbolAnchor.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 the SymbolAnchor.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, see SymbolAnchor.PlacementMode for a description of the effects of each mode. The default mode is SymbolAnchor.PlacementMode.RELATIVE.
      Returns:
      the placement mode
      Since:
      100.5.0