|
|
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.
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+unsubscribe@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/CAL-8oAiRN3h4QWf4hPr3dF1VkPXAK48QhGz3efeXwzLO4UjzVA%40mail.gmail.com.
[ Direct Link to Message ] | |
|
| |