PistonDevelopers / conrod

An easy-to-use, 2D GUI library written entirely in Rust.
Other
3.35k stars 296 forks source link

Implement gradient for widgets #954

Open ishitatsuyuki opened 7 years ago

ishitatsuyuki commented 7 years ago

It seems Gradient is defined in the color module but never used.

I would like to use that for some widgets instead of flat color.

Probably https://github.com/PistonDevelopers/graphics/issues/1076 should be implemented first.

mitchmindtree commented 6 years ago

Just want to add here that conrod does now support gradients, though only via the glium and gfx backends. I don't think there's a way to colour individual vertices different colours in piston yet, so piston backend just shows flat colours for now.

Gradients can be achieved by using the Triangles object with Triangles of ColoredPoints. There is not yet any high-level API for displaying gradients and I haven't yet thought much about how to provide this. Any suggestions or references to other high-level gradient APIs welcome!