struct
TUI::ClipRect
- TUI::ClipRect
- Struct
- Value
- Object
Overview
A rectangle, in the same 1-based coordinate convention as Widget#x/ #y, that Screen#with_clip bounds #blit writes to. Exists so a container of independently-compositing children (see Grid, src/tui/layout/grid.cr) can bound where its children are allowed to draw without needing to intercept or redirect their #composite calls — every Widget#composite ever reaches the real screen through exactly one call, Screen#blit, so clipping there is sufficient no matter how deep the widget tree gets.
Defined in:
tui/core/screen.crConstructors
Instance Method Summary
- #clone
- #col : Int32
- #copy_with(row _row = @row, col _col = @col, height _height = @height, width _width = @width)
- #height : Int32
-
#intersect(other : ClipRect) : ClipRect
Narrows
selfto the overlap withother— used by #with_clip so a nested clip can only ever shrink the bound in effect, never widen past an outer container's own clip. - #row : Int32
- #width : Int32
Constructor Detail
Instance Method Detail
Narrows self to the overlap with other — used by #with_clip so
a nested clip can only ever shrink the bound in effect, never
widen past an outer container's own clip.