struct

PF2d::Rect(T)

Inherits Enumerable < Struct < Value < Object

Constructors

new(x : T, y : T, width : T, height : T)
Source
new(top_left : PF2d::Vec2(T), size : PF2d::Vec2(T))
Source

Instance methods

area
Source
bottom
Source
bottom_edge
Source
bottom_left
Source
bottom_right
Source
center
Source
covers?(x, y)
Source
covers?(point : Vec)
Source
covers?(other : Rect)
Source
each

Must yield this collection's elements to the block.

Source
height
Source
intersection?(other : Rect)
Source
left
Source
left_edge
Source
map_points(dest : Rect(Number), scale : Vec2(Float), &)
Source
map_points(dest : Rect(Number), &)
Source
merge(other : Rect)
Source
quad
Source
right
Source
right_edge
Source
size

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4
Source
size=(size : Vec2(T))
Source
to_f

Return a new Rect as Rect(Float64)

Source
to_f32

Return a new Rect as Rect(Float32)

Source
to_f64

Return a new Rect as Rect(Float64)

Source
to_i

Return a new Rect as Rect(Int32)

Source
to_i128

Return a new Rect as Rect(Int128)

Source
to_i16

Return a new Rect as Rect(Int16)

Source
to_i32

Return a new Rect as Rect(Int32)

Source
to_i64

Return a new Rect as Rect(Int64)

Source
to_i8

Return a new Rect as Rect(Int8)

Source
to_tris(cast = T)

DEPRECATED Use #tris

Source
to_u

Return a new Rect as Rect(UInt32)

Source
to_u128

Return a new Rect as Rect(UInt128)

Source
to_u16

Return a new Rect as Rect(UInt16)

Source
to_u32

Return a new Rect as Rect(UInt32)

Source
to_u64

Return a new Rect as Rect(UInt64)

Source
to_u8

Return a new Rect as Rect(UInt8)

Source
top_edge
Source
top_left
Source
top_left=(top_left : Vec2(T))
Source
top_right
Source
tris(cast = T)
Source
width
Source

Macros

[](*args)
Source