Advertisement
Wies

CODEA: mesh image function

Apr 12th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. function imageMesh(img, x, y, w, h, r)
  2.     if w == nil and h == nil then
  3.         meshW, meshH = spriteSize(img)
  4.     else
  5.         meshW, meshH = w, h
  6.     end
  7.     if r == nil then
  8.         r = 0
  9.     end
  10.  
  11.     drawingMesh = mesh()
  12.     drawingMesh:addRect(x, y, meshW, meshH, r)
  13.     drawingMesh.texture = img
  14.     drawingMesh:draw()
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement