Skip to content
Ivan Baidakou edited this page Oct 4, 2015 · 4 revisions

Renderer:copyEx

Copy texture to the renderer. The table may or must have the following fields:

  • texture, the texture (see Texture)
  • source, (optional) the source rectangle (see Rect)
  • destination, (optional) the destination rectangle (see Rect)
  • angle, (optional) the angle
  • center, (optional) the center point (see Point)
  • flip, (optional) the flip (see SDL.rendererFlip)

Method

SYNOPSIS

ret, err = function Renderer:copyEx({
             texture     = texture,
             source      = {x = 0 , y = 0, w = 10, h = 20},
             destination = nil,                            -- copy to whole destination rectangle
             nil,                                          -- no angle
             nil,                                          -- no center
             flip        = SDL.rendererFlip.Horizontal,    -- do horizontal flip
})

ARGUMENTS

  • params, the parameters

RETURNS

  • ret, true on success or false
  • err, the error message

Clone this wiki locally