-
Notifications
You must be signed in to change notification settings - Fork 22
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
Colors #81
base: master
Are you sure you want to change the base?
Colors #81
Conversation
@benEnsta could you check why your proposition for coloration using #RGB isn't integrated? |
I checked my code, with your proposition coloration using #RGB or #RRGGBB works without any problem. However I wonder why the new brush (or pen) aren't saved in the _brush QHash list because it avoid to instantiate a new brush for each item. |
Agreed, I just didn't want to copy/paste the 149 color names, but I will. |
I think you don't have to copy color names. Just instead of directly return the new color object, you should add it to _brush. You should also check if the color exist in _bruch before. So if the color already exist in the QHash return the brush else add the new color. |
I see what you mean, I will do it this way. |
Done. If nobody disagrees with the RGBA color settings command, I will merge this pull request by the end of the week. |
I actually don't like passing RGB/A colors in the "format" field.
|
I am not sure having lineWidth setting in the format field keeps things "Matlab simple" (Matlab uses a separate lineWidth property) but why not if you clearly see an advantage. Basically, I think the format field has to remain simple and readable, so don't make it too complicated. People wanting to do more advanced things (like RGBA color selection) are advanced users, so they have to learn how to specify additional properties. |
Adds long awaited:
Are you OK with this format?
How would you like to specify a lineWidth in the format?
for example, to set a 12 width line with : style, blue edges, white face, possibilities are:
Should we add a way to specify transparency for named colors in the format?
@dvinc @SimonRohou @ThomasLeMezo @msis @ClementAubry