struct

Platform::Rect

Inherits JSON::Serializable < Struct < Value < Object

Constructors

new(pull : JSON::PullParser)
Source
new(id : UUID, bg : Tuple(UInt8, UInt8, UInt8, UInt8) = {0, 0, 0, 255}, w : Float64 = 0, h : Float64 = 0, x : Float64 = 0, y : Float64 = 0)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

acquire(platform : Platform)

Requests a matching rectangle from the platform backend.

Source
bg=(bg : RGBA)
Source
h=(h : Float64)
Source
release(platform : Platform)

Asks platform backend to release (destroy, deallocate) this rectangle, and forget its ID.

All subsequent calls to this rectangle will be ignored.

If you still have hold of this rectangle, you can acquire it back using ackquire.

Source
upload(platform : Platform)

Asks platform backend to draw this rectangle.

Source
w=(w : Float64)
Source
x=(x : Float64)
Source
y=(y : Float64)
Source