LayoutProviderHelper
Namespace: Hex1b.Nodes
Assembly: Hex1b.dll
Provides common clipping logic for layout providers. Handles intersection with parent layout providers automatically.
csharp
public static class LayoutProviderHelperInheritance
Object → LayoutProviderHelper
Methods
ClipString(ILayoutProvider, int, int, string)
Clips a string to the effective clip rect (intersection of this provider and parent).
Parameters:
provider(ILayoutProvider):x(Int32):y(Int32):text(String):
Returns: ValueTuple<Int32, String>
csharp
public static (int adjustedX, string clippedText) ClipString(ILayoutProvider provider, int x, int y, string text)GetEffectiveClipRect(ILayoutProvider)
Computes the effective clip rect by intersecting this provider's clip rect with its parent's clip rect (if any).
Parameters:
provider(ILayoutProvider):
Returns: Rect
csharp
public static Rect GetEffectiveClipRect(ILayoutProvider provider)ShouldRenderAt(ILayoutProvider, int, int)
Determines if a character at the given absolute position should be rendered, considering both this provider's clip rect and any parent's.
Parameters:
provider(ILayoutProvider):x(Int32):y(Int32):
Returns: Boolean
csharp
public static bool ShouldRenderAt(ILayoutProvider provider, int x, int y)