FLTK logo

Re: [fltk.general] Re: Rounded Frames/Draw Rounded Rectangle

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Re: Rounded Frames/Draw Rounded Rectangle Webb Hinton Jul 27, 2021  
  Or consider the following UI designs:

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. 

On Tuesday, July 27, 2021 at 1:26:55 PM UTC-4 spitzak wrote:
Any region clipping probably should be part of the drawing api. Fl_Region is just left over from an attempt to provide some access to X clipping, and exposes how it works far too much.
IMHO there is so little use of clipping to anything other than a rectangle that there is no need to support it. Rectangles are relatively easy, as intersecting two of them is still a rectangle.


On Tue, Jul 27, 2021 at 9:47 AM Webb Hinton <caroli...@gmail.com> wrote:
Perhaps if no examples of using a Fl_Region exist and people are not using Fl_Region/don't know how to use FL_Region, it should be deprecated or removed? 

Additionality, requiring OS-specific code to generate an FL_Region seems to clash with FLTK's cross-platform nature. 

That being said, I think having a means of providing an arbitrary clipping shape in FLTK's drawing module is still highly desirable.

 I know that we can set an arbitrary shape for a Window,  would it be impossible to translate this design into a method that would work in the context of the draw module? 

On Tuesday, July 20, 2021 at 1:15:51 PM UTC-4 Webb Hinton wrote:
Yes I'm a little confused about the "Region" API. Does anyone have an example of how to use this?

On Tuesday, July 20, 2021 at 6:05:30 AM UTC-4 Manolo wrote:
FLTK provides only ways to clip to a rectangle. It's also possible to clip to a region, but FLTK contains no
means to create a region. The region is expected to have been created for FLTK by the OS.

Fl_Window::shape() method controls the shape of the window itself, thus it prevents any drawing
outside the shape region.

--
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.

--
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/bd6755a1-0a22-45a8-a05c-4d8f70a9a7d6n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.