Skip to content

rect

Create an immutable rectangle graphic for self.graph. Available as rect after import_globals() or mv.graphics.rect.

Parameters

  • width — A positive width.
  • height — A positive height.
  • options? — A table with color and pivot ("center" or "top-left").
local box = rect(32, 32, {color = {80, 190, 255}})

Related: circle, mv.graphics.sprite.

See the drawing guide for more examples and limits.