Am I right that the only kind of non-rectangular clipping available in FLTK is FL:Window's set_shape() method?
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/9da638fa-4e62-43f9-bf19-9422e7f50ad1n%40googlegroups.com.
On 7/27/21 1:27 PM, Webb Hinton wrote:
Or consider the following UI designs: [images with rounded corners]
Our nanoSVG support should allow this sort of thing easily I'd
think,
utilizing its alpha support, anti-aliased rendering, and
ability to draw
graphics at runtime.
Consider this clock example which draws the hand shapes in
realtime
over the clock face image:
http://seriss.com/people/erco/fltk/#FLTK-Simplex-Clock
One should also be able to render a mask with curved corners
and apply it
over the images similar to the clock I would think. Then you
can make that
a custom widget to display images of arbitrary size with a
curved border.
On 7/27/21 6:02 PM, Albrecht Schlosser wrote:
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>
You could also draw the image first in a rectangular shape and the rounded corners (in the background color) "over" the image.
Yep, that's actually what I just ended up implementing as a widget called RoundedImageDisplay.
Added it to my cheat page just now:
http://seriss.com/people/erco/fltk/#RoundedCorners
The result is antialiased corners, and in the demo you can interactively change the corner radius
with a slider, the result being:
Yep, that's actually what I just ended up implementing as a widget called RoundedImageDisplay.
Added it to my cheat page just now:
http://seriss.com/people/erco/fltk/#RoundedCorners