struct Platform::Rect
- Platform::Rect
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
aspis/platform.crConstructors
- .new(pull : JSON::PullParser)
- .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)
Instance Method Summary
-
#acquire(platform : Platform)
Requests a matching rectangle from the platform backend.
- #bg : RGBA
- #bg=(bg : RGBA)
- #h : Float64
- #h=(h : Float64)
- #id : UUID
-
#release(platform : Platform)
Asks platform backend to release (destroy, deallocate) this rectangle, and forget its ID.
-
#upload(platform : Platform)
Asks platform backend to draw this rectangle.
- #w : Float64
- #w=(w : Float64)
- #x : Float64
- #x=(x : Float64)
- #y : Float64
- #y=(y : Float64)
Constructor Detail
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)
#
Instance Method Detail
Requests a matching rectangle from the platform backend.
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
.