gama.old
gama.old copied to clipboard
gradient fill a shape
I would like to request an enhancement to be able to fill a shape with gradient colour. Something like fill_gradient() perhaps?
I see some possible syntax formats here https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient
and some examples here https://docs.oracle.com/javase/7/docs/api/java/awt/LinearGradientPaint.html
thanks
Yep -- not too complex to implement in Java2D (Oracle's doc), but a pain in OpenGL as far as I can see what it would mobilise (either painting to a dynamic texture or weighing the vertices depending on the gradient stop points...). Actually, simple gradients on simple shapes should be easy to produce (triangles, quadrilaterals), but the main problem would be to render them on complex shapes...
Hmm, I am more than happy to have this in just the basic shapes. It is for visualising agent's property, such as energy levels in predator-prey models or happiness index in segregation models. Or do you have some other temporary solution?
I mean depleting or replenishing energy or happiness levels, this variable goes into the linear gradient percentage.
With the "shader" pipeline of opengl, gradiant colors are super easy to implement. But I don't know in which stage is this work... On Feb 24, 2017 4:35 AM, "Srirāma Bhamidipāti" [email protected] wrote:
I mean depleting or replenishing energy or happiness levels, this variable goes into the linear gradient percentage.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gama-platform/gama/issues/2119#issuecomment-282025847, or mute the thread https://github.com/notifications/unsubscribe-auth/AMYF42GPmKH9bq5iKyZZDk6qFXvtiGwaks5rfadAgaJpZM4MKDvx .
Now tracked in #2728
Reopening this issue for the next round of development on GAMA 2.0