Opal::UI::Layer
Represents an isolated 2D drawing surface with position, z-index, visibility, and clipping rectangle. Layers allow complex UIs, floating windows, dropdowns, and overlays to be rendered independently and composited in depth order.
Constructors
Instance methods
blit_to(target : Buffer) : Nil
Blits this layer onto a target buffer at (@x, @y), respecting visibility, transparent_bg, and any layer clipping rectangle.
buffer
Sourceclip_rect
Sourceclip_rect=(clip_rect : Rect | Nil)
Sourceheight
Sourceopacity
Sourcerender_element(element : Element, rel_x : Int32 = 0, rel_y : Int32 = 0, render_w : Int32 | Nil = nil, render_h : Int32 | Nil = nil) : Nil
Renders a declarative UI element onto this layer.
Resizes the layer's internal buffer, preserving existing content if possible.
transparent_bg?
Sourcevisible?
Sourcewidth
Sourcez_index
Source