Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing image constructor in lua #204

Closed
CIB opened this issue Apr 7, 2013 · 1 comment
Closed

Missing image constructor in lua #204

CIB opened this issue Apr 7, 2013 · 1 comment

Comments

@CIB
Copy link
Contributor

CIB commented Apr 7, 2013

black = Color(0, 0, 0);

Error in file Polycode/Image.lua on line 22
bad argument #1 to 'Image' (string expected, got number)

Trying to use this constructor:

Image(int width, int height, int type = IMAGE_RGBA);

@ivansafrin
Copy link
Owner

Since Lua (or rather my class system) doesn't support multiple constructors, I've added static accessors to all the other constructors. So you can use Image.BlankImage() instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants