Skip to content

Restructured models#20

Open
Xalag wants to merge 9 commits intoharjot-oberai:masterfrom
Xalag:master
Open

Restructured models#20
Xalag wants to merge 9 commits intoharjot-oberai:masterfrom
Xalag:master

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.

1 participant