Method: TexPlay#splice

Defined in:
lib/texplay/c_function_docs.rb

#splice(x, y, source, options = {}) ⇒ Gosu::Image Also known as: composite

Copy an image into another image.

Parameters:

  • x (Number)

    Horizontal position to splice at.

  • y (Number)

    Vertical position to splice at.

  • source (Gosu::Image)

    Image to copy from.

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

    a customizable set of options

Options Hash (options):

  • :chroma_key (Gosu::Color, Array<Float>, Symbol)

    Colour to treat as transparent (only other colour pixels will be spliced).

  • :chroma_key_not (Gosu::Color, Array<Float>, Symbol)

    Colour to copy (other colours won't be spliced).

  • :crop (Array<Float>) — default: [0, 0, source.width - 1, source.height - 1]

    Area of the source image to splice.

Returns:



167
168
# File 'lib/texplay/c_function_docs.rb', line 167

def splice(x, y, source, options = {})
end