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

Restructured models #20

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Restructured models #20

wants to merge 9 commits into from

Conversation

Xalag
Copy link

@Xalag Xalag commented Mar 27, 2019

Thanks for this awsome library! I used it in production code and it works very well. Still there were 2 issues with it:

  • When a path and a group are sibling elements in the xml then the group was always drawn first, even if the path was first in xml. This changed drawing order, so that sometimes paths "disappeared".
  • When VectorMasterDrawable was used and the rotation of a group was set programatically, then it happened that the rotation was not set. The problem was, that the rotation was tryed to be set before the Drawable first appeared. Therefore scaleMatrix was still null and the rotation could not be applied, because scaleMatrix only gets created when onBoundsChanged is called in the Drawable.

To solve these issues I needed to restructure the model classes and the way transformations are applied. I measured the drawing time before and after the code changes and it is still pretty much the same.

It should also be possible to resolve issue #3 "Add functionality to dynamically add groups, paths etc. to the Vector" with this implementation, even adding/removing new models is not very comfortable. I did not explicitly tested adding models dynamically.

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

1 participant