Class RenderZone
Represents a rectangular rendering zone within the console interface. Manages dirty state tracking and provides coordinate boundaries for partial screen updates.
public class RenderZone
- Inheritance
-
RenderZone
- Inherited Members
Constructors
RenderZone(string, Region, int)
Creates a new render zone with the specified identifier and bounds
public RenderZone(string zoneId, Region bounds, int renderPriority = 100)
Parameters
zoneIdstringUnique identifier for this zone
boundsRegionInitial spatial boundaries
renderPriorityintRender order priority (default: 100)
Properties
Bounds
The spatial boundaries of this render zone in console coordinates
public Region Bounds { get; set; }
Property Value
HasLayoutDependencies
Whether this zone's content depends on other zones' layouts
public bool HasLayoutDependencies { get; set; }
Property Value
IsDirty
Indicates whether this zone needs to be redrawn on the next render cycle
public bool IsDirty { get; set; }
Property Value
LastUpdate
Timestamp of the last successful render operation for this zone
public DateTime LastUpdate { get; }
Property Value
RenderPriority
Priority level for rendering order (lower numbers render first)
public int RenderPriority { get; set; }
Property Value
ZoneId
Unique identifier for this zone within the renderer
public string ZoneId { get; }
Property Value
Methods
GetIntersection(RenderZone)
Calculates the area of intersection with another zone
public Region? GetIntersection(RenderZone other)
Parameters
otherRenderZoneThe zone to calculate intersection with
Returns
- Region
The intersecting region, or null if no intersection
IntersectsWith(RenderZone)
Checks if this zone intersects with another zone's boundaries
public bool IntersectsWith(RenderZone other)
Parameters
otherRenderZoneThe zone to check intersection with
Returns
- bool
True if the zones overlap spatially
Invalidate()
Marks this zone as needing a redraw
public void Invalidate()
MarkRendered()
Marks this zone as clean and updates the last render timestamp
public void MarkRendered()
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
UpdateBounds(Region)
Updates the zone boundaries and invalidates if they changed
public void UpdateBounds(Region newBounds)
Parameters
newBoundsRegionThe new spatial boundaries