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

Custom color/format creation #89

Open
nicolaje opened this issue Nov 5, 2015 · 1 comment
Open

Custom color/format creation #89

nicolaje opened this issue Nov 5, 2015 · 1 comment

Comments

@nicolaje
Copy link
Member

nicolaje commented Nov 5, 2015

On @benEnsta suggestion, add a command to create named custom colors or format from the client.
RGB and RGBA are heavy to use, therefore we could add commands to create custom named colors or formats:

vibes::addNamedColor("myRed",(vibes::RGBA){255,0,0,50});

vibes::drawBox(0,1,0,1,vibesParams("FaceColor","myRed"));

vibes::addNamedFormat("myFormat","FaceColor","myRed","EdgeColor",(vibes::RGBA){42,43,44,45},"LineWidth",1,"LineStyle",":-"));

vibes::drawCircle(0,0,50,"myFormat");
@nicolaje
Copy link
Member Author

nicolaje commented Nov 5, 2015

Afterthought:
if the goal is to not have to manipulate RGB/A structure, why not set a group property? Are there use cases (readability of the code?) where we would need named colors instead of group properties?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant