Skip to content

class Image < Commands::Base internal ​

Command to render an Hokusai::Image

#initialize(image, x, y, width, height) internal ​

constructor

Arguments ​

  • image - a Hokusai::Image
  • x - x coordinate
  • y - y coordinate
  • width - width (float)
  • height - height (float)

#slice=(rect) public ​

Specify a slice of the image to render

Useful for spritesheets

Arguments ​

  • rect - a Hokusai::Rect which denotes where to pick from the image

Returns ​

Returns nothing