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

don't add transforms in shape_element() if not necessary #34

Merged
merged 2 commits into from May 23, 2018

Conversation

kjyv
Copy link

@kjyv kjyv commented May 23, 2018

shape_element() always rotates and translates even if both parameters are 0. This degrades performance for animations.

@Zulko
Copy link
Owner

Zulko commented May 23, 2018

Ok, but can you also separate the cases where only translation or only rotation are 0 ?

result = Element(new_draw)
if angle:
   result = result.rotate(angle)
if xy != (0, 0):
  result = result.translate(xy)
return result

@kjyv
Copy link
Author

kjyv commented May 23, 2018

Sure

@Zulko Zulko merged commit eb3c081 into Zulko:master May 23, 2018
@Zulko
Copy link
Owner

Zulko commented May 23, 2018

thanks

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

Successfully merging this pull request may close these issues.

None yet

3 participants