module

PF2d::Canvas(T)

Inherits Enumerable < PF2d::Viewable < PF2d::Drawable

Instance methods

clip(rect : Rect)
Source
draw(canvas : Canvas(T), src_rect : Rect(Number), dst_rect : Rect(Number), &)

Copy canvas to self, yielding a block with src value and dst value that will determine how the values are blended

  • src_rect is scaled to dst_rect
Source
draw(canvas : Canvas(T), pos : Vec = Vec[0, 0], src_rect : Rect(Number) | Nil = nil, &)
Source
draw(canvas : Canvas(T), pos : Vec = Vec[0, 0], src_rect : Rect(Number) | Nil = nil)
Source
each

Must yield this collection's elements to the block.

Source
each_point
Source
each_row
Source
height
Source
in_bounds?(x, y)
Source
in_bounds?(point)
Source
quad
Source
rect
Source
size

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4
Source
width
Source

Macros

[](*args)
Source