Raxol.Terminal.Buffer.DamageTracker (Raxol v2.0.1)
View SourceTracks damage regions in a terminal buffer for efficient rendering. Damage regions indicate areas that have changed and need to be redrawn.
Summary
Functions
Adds a damage region to the tracker.
Adds multiple damage regions at once.
Clears all damage regions.
Returns the count of damage regions.
Gets all damage regions.
Checks if there are any damage regions.
Merges overlapping or adjacent regions to reduce redundancy.
Creates a new damage tracker with a maximum region limit.
Types
@type region() :: {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()}
@type t() :: %Raxol.Terminal.Buffer.DamageTracker{ max_regions: non_neg_integer(), regions: [region()] }
Functions
@spec add_damage_region( t(), non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer() ) :: t()
Adds a damage region to the tracker.
Adds multiple damage regions at once.
Clears all damage regions.
@spec damage_count(t()) :: non_neg_integer()
Returns the count of damage regions.
Gets all damage regions.
Checks if there are any damage regions.
Merges overlapping or adjacent regions to reduce redundancy.
@spec new(non_neg_integer()) :: t()
Creates a new damage tracker with a maximum region limit.