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

Make FooDetails objects appearance (coloring/size) more sharable #11

Closed
hageldave opened this issue Jul 27, 2019 · 1 comment
Closed

Comments

@hageldave
Copy link
Owner

hageldave commented Jul 27, 2019

Especially for Brush&Link operations, it is desired to change the color or size of many objetcs such as points at once (like desaturating them or making them translucent).
Currently classes like PointDetails have the coloring and scaling information stored as primitive types, so that each point instance has its own memory for these attributes.

It may be desired to have a single coloring information object for all PointDetails objects in a Points object or across Points objects, in order to save memory and in order to be able to change color of all points with a single operation without the need to loop through the PointDetails objects.
By using a reference to some kind of ColorInformation object within a Details object, sharing can be made possible.

The API can also be simplified by only requiring positional data in the add methods, which can return the PointDetails object so that further appearance attributes can be set (like ColorInformation). This will break chainable add calls, but should be worth it since adding these graphical primitives is seldomly done this way.

Of course this also applies to SegmentDetails and TriangleDetails.

@hageldave
Copy link
Owner Author

Done as of 2f8e217

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

No branches or pull requests

1 participant