class

Opal::UI::Canvas2D

Inherits Opal::UI::Element < Opal::UI::Themable < Reference < Object

Declarative 2D canvas element allowing custom vector line, shape, and primitive drawing operations via a drawing callback.

Constructors

new(width : Int32 | Nil = nil, height : Int32 | Nil = nil, &block : Buffer, Int32, Int32, Int32, Int32 -> Nil)
Source

Instance methods

draw_callback
Source
height
Source
height=(height : Int32 | Nil)
Source
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
Source
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
Source
width
Source
width=(width : Int32 | Nil)
Source