Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

lua drawinrect

function drawinrect(img, x, y, w, h, r, ox, oy, kx, ky)
    return -- tail call for a little extra bit of efficiency
    love.graphics.draw(img, x, y, r, w / img:getWidth(), h / img:getHeight(), ox, oy, kx, ky)
end
Source by love2d.org #
 
PREVIOUS NEXT
Tagged: #lua #drawinrect
ADD COMMENT
Topic
Name
2+4 =