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

Draw line using a gradient color #163

Open
dragosslujeru opened this issue Jan 11, 2021 · 2 comments
Open

Draw line using a gradient color #163

dragosslujeru opened this issue Jan 11, 2021 · 2 comments

Comments

@dragosslujeru
Copy link

Hello,

I am using draw2d to draw some graphics using go and it's going great. Thank you for the library!
I have a usecase where I would need the line I am drawing to use a gradient color instead of a solid color. As an example the line could start green and end red.
Can this be done? I've been looking around for a way to achieve this but so far I have come up short.
Thank you in advance for any answer.

@llgcode
Copy link
Owner

llgcode commented Jan 12, 2021

Hi @dragosslujeru ,
there's no gradient support in draw2d and it's not planned to have any soon.
You might want to use another library like https://github.com/fogleman/gg/blob/master/gradient.go
thanks

@dragosslujeru
Copy link
Author

Thank you for the reply. I will look at it.

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

2 participants