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

[Doc][Shadow] Center argument was removed from Shadows #18

Closed
Ranguna opened this issue Aug 27, 2015 · 3 comments
Closed

[Doc][Shadow] Center argument was removed from Shadows #18

Ranguna opened this issue Aug 27, 2015 · 3 comments
Labels

Comments

@Ranguna
Copy link

@Ranguna Ranguna commented Aug 27, 2015

In the wiki you wrote that the shadows draw function should be called like this:

nine.draw(shadow,x,y,w,h,center,pad,depth)

Ex:

nine.draw(shadow,0,0,100,100,false,false,5)

But when the function is called like this the shadow depth will always be set to the default which is 1.
The problem is that the draw function doesn't take the argument 'center' and instead skips from 'h' to 'pad', so in the exemple above the depth variable would be set to false and the 8th argument would be discarded.
Notice in your code that you don't have the 'center' variable in your arguments https://github.com/Positive07/material-love/blob/master/libs/nine.lua#L137

To fix this either change the wiki or add the center functionality to the draw function.

@pablomayobre

This comment has been minimized.

Copy link
Owner

@pablomayobre pablomayobre commented Aug 27, 2015

Yes you are right that is a wiki error!

As you can see this changed from this commit to the next one because nine.lua got the ability to handle broken línes and the center is now unknown.

The wiki will be updated for 2.0.0 soon so I'm not sure I'll be fixing this, sorry (I'll keep the issue open for reference)

@Ranguna

This comment has been minimized.

Copy link
Author

@Ranguna Ranguna commented Aug 27, 2015

Ah alright, I'll just remove the center argument from my draw calls then.
Thanks.

@pablomayobre

This comment has been minimized.

Copy link
Owner

@pablomayobre pablomayobre commented Jun 8, 2016

Fixed the docs. If I ever release 2.0.0 this issue wont exist at all

@pablomayobre pablomayobre changed the title [Bug][nine][shadow]Problem when drawing shadows. [doc][shadow] Problem when drawing shadows. Jun 10, 2016
@pablomayobre pablomayobre changed the title [doc][shadow] Problem when drawing shadows. [Doc][Shadow] Center argument was removed from Shadows Jun 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.