Method: Gosu::Image.load_tiles

Defined in:
rdoc/gosu.rb

.load_tiles(source, tile_width, tile_height, options = {}) ⇒ Array<Gosu::Image> .load_tiles(window, source, tile_width, tile_height, tileable) ⇒ Array<Gosu::Image>

Note:

For Windows Bitmap (BMP) images, magenta (FF00FF, often called “magic pink” in this context) is treated as a chroma key and all pixels of that color are automatically rendered fully transparent.

Loads an image from a file or an RMagick image, then divides the image into an array of equal-sized tiles.

(Passing a Window reference is not necessary anymore, please use the first overload from now on.)

Parameters:

  • source (String, Magick::Image)
  • tile_width (Integer)

    If positive, this is the width of the individual tiles; if negative, the image is divided into -tile_width columns.

  • tile_height (Integer)

    If positive, this is the height of the individual tiles; if negative, the image is divided into -tile_height rows.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :tileable (true, false) — default: false

    if true, the Image will not have soft edges when scaled

  • :retro (true, false) — default: false

    if true, the image will not be interpolated when it is scaled up or down. When :retro it set, :tileable has no effect.

Returns:

See Also:



445
# File 'rdoc/gosu.rb', line 445

def self.load_tiles(source, tile_width, tile_height, options = {}); end