|
|
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...
>
> It doesn't seem like there's much appetite for rounded edges here, but I think saying that the use cases are too far and few between ignores the fact that rounded frames are both useful and popular tool for designing GUIs. Just look at the design of Google Groups (or any google product), you'll find a plethora of rounded edges.
It is, I think, very much a “horses for courses” thing, though.
Clipping to non-rectilinear bounds is potentially complex in a lot of cases, so does not represent a good fit for the fltk “fast and light” ethos.
It may be that, if it is a style you need, then some heavier-weight toolkit might be a better fit for that task.
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 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/633ED889-22F3-42B1-8714-A2E768B60070%40gmail.com.
[ Direct Link to Message ] | |
|
| |