-
Notifications
You must be signed in to change notification settings - Fork 129
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
Allow update of drawing items #17
base: master
Are you sure you want to change the base?
Conversation
if an item is ignored, it still goes through sorting. If the item is removed all together, don't need to worry about if the item is drawn or not later in processing
fixed comments for new setters
used for comparisons
…ape this item was apart of
…f a singular point
removed bug with calculating twice
This reverts commit 45b6998.
… Intended to be used to replace shapes in-place in the items list. One example is re-coloring only certain drawing items, all items do not need to be re-added/re-calculated
} | ||
|
||
//allow user to recalculate only certain items | ||
public void updateItems(List<Item> items, boolean cull, boolean boundsCheck) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't the interception checks for the none updated items missing when you update an item that is behind an none updated one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user would be using this method to directly manipulate the items list returned from getCurrentItems()
. I will add a comment that they are taking potentially dangerous actions when they use this method (manipulating an item that is covered by another item), but it is still a useful method to have.
In my own implementation, I get the current items List lis = getCurrentItems()
and find references to some Shape s
I care about. I then create new Item
into List modItems
and use updateItems(modItems, true, true)
to perform all of the path calculations with culling and bounds detection which removes the bad faces from the provided list. I then directly remove/replace the items updateItemsList(lis, modItems)
Im going to merge #16 first. Do you want to take a look to see how much the performance improved?Mostly just the amount of allocations is reduced. |
I definitely believe that about I'll definitely take a look at the other performance improvements! |
… in translateIsoToViewPoint
I have added some commits which include the ability to convert to/from Isometric and View coordinate systems. |
A user can now have access to the drawing items, and can provide a short list of items that need to be re-calculated. Intended to be used to replace shapes in-place in the items list.
One example is re-coloring only certain drawing items, all items do not need to be re-added/re-calculated.
Moved transformColor to a static context that can be used outside the library when the user is creating items.