struct Platform::Rect

Included Modules

Defined in:

aspis/platform.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.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) #

[View source]

Instance Method Detail

def acquire(platform : Platform) #

Requests a matching rectangle from the platform backend.


[View source]
def bg : RGBA #

[View source]
def bg=(bg : RGBA) #

[View source]
def h : Float64 #

[View source]
def h=(h : Float64) #

[View source]
def id : UUID #

[View source]
def 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.


[View source]
def upload(platform : Platform) #

Asks platform backend to draw this rectangle.


[View source]
def w : Float64 #

[View source]
def w=(w : Float64) #

[View source]
def x : Float64 #

[View source]
def x=(x : Float64) #

[View source]
def y : Float64 #

[View source]
def y=(y : Float64) #

[View source]