Class CrossStateAnchor

java.lang.Object
io.github.jspinak.brobot.model.element.Anchor
io.github.jspinak.brobot.model.element.CrossStateAnchor

public class CrossStateAnchor extends Anchor
Enhanced anchor that can reference matches from other states. This allows regions to be defined using reference points from objects in different states, enabling more flexible and dynamic region definitions.
  • Constructor Details

    • CrossStateAnchor

      public CrossStateAnchor()
    • CrossStateAnchor

      public CrossStateAnchor(Positions.Name anchorInNewDefinedRegion, Positions.Name positionInMatch)
  • Method Details

    • getAdjustedLocation

      public Location getAdjustedLocation(Location matchLocation, Region matchRegion)
      Creates a Location from a match, applying adjustments.
      Parameters:
      matchLocation - The location of the matched object
      matchRegion - The region of the matched object
      Returns:
      The adjusted location for this anchor
    • getSourceStateName

      public String getSourceStateName()
    • getSourceObjectName

      public String getSourceObjectName()
    • getSourceType

      public StateObject.Type getSourceType()
    • getAdjustments

      public MatchAdjustmentOptions getAdjustments()
    • setSourceStateName

      public void setSourceStateName(String sourceStateName)
    • setSourceObjectName

      public void setSourceObjectName(String sourceObjectName)
    • setSourceType

      public void setSourceType(StateObject.Type sourceType)
    • setAdjustments

      public void setAdjustments(MatchAdjustmentOptions adjustments)