gostudent / aurora

Aurora is a package to create quote images
9 stars 5 forks source link

Flexible Gradients #22

Closed mubaris closed 6 years ago

mubaris commented 6 years ago

Right now, the user can only use pre-defined 2-color gradients. We need the following requirements

pani-vishal commented 6 years ago

I'd like to take this

pani-vishal commented 6 years ago

How do I redefine svg.Offcolor? By writing this? type Color svg.Offcolor? Because if I do that... canvas.LinearGradient() wont accept type Color.

mubaris commented 6 years ago

type Color svg.OffColor Do this, then in canvas.LinearGradient use type assertion to convert back to svg.OffColor

pani-vishal commented 6 years ago

Ohhk thanks! Got it

pani-vishal commented 6 years ago

Is it fine if the user selects a gradient in the program he/she is writing? Like: lg = aurora.Gradient[5] or creating his own gradient and passing it in Create function?

mubaris commented 6 years ago

They have to create their Gradient. That's the point

pani-vishal commented 6 years ago

Okay thanks!