|
|
On 7/27/21 10:46 PM Ian MacArthur wrote:
On 27 Jul 2021, at 21:27, Webb Hinton wrote:
Or consider the following UI designs:
Rounded avatar pictures:
<roundedavatars.PNG>
Rounded images in a grid:
<masonary-images.jpg>
As far as I can tell there's no way to clip to rounded edges in FLTK in a way that would (with reasonable effort) create such effects.
I'm sure you could find some way to edit the pixel data of the image themselves to get these rounded edges, but that sounds very complicated...
You can of course create those effects in fltk, but there are no “default” widgets that will do that.
Typically, you’d do this by rendering to a (rectangular) offscreen surface, then mask that with a “barn door” (usually only two states, transparent and opaque) alpha channel mask to show the appropriate final shape. You need to derive your own widget for this though, from Fl_Box say, as it is not an “out of the box” feature.
You could also draw the image first in a rectangular shape and the
rounded corners (in the background color) "over" the image.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/f0d23c35-0875-3b13-df24-1ffdc4d38928%40online.de.
[ Direct Link to Message ] | |
|
| |