summaryrefslogtreecommitdiff
path: root/src/fl_read_image.cxx
AgeCommit message (Collapse)Author
46 hourswipmaxim nikonov
2022-09-11Fix fl_read_image() under hybrid Wayland/X11 platform.ManoloFLTK
Function fl_read_image() obliges to keep a minimal use of global variable fl_window also under the Wayland platform, even if its type (Window) makes little sense for the hybrid library because it has its X11 value (given by X11/X.h) which is not meaningful for the Wayland leg of the hybrid platform. Virtual member function Fl_Surface_Device::as_image_surface() becomes useless.
2022-09-11Fix regression in fl_read_image() after introduction of hybrid Wayland/X11 ↵ManoloFLTK
platform. The special use context of fl_read_image() inside the draw() function of an Fl_Double_Window, where the function should read inside the window's double buffer rather than the on-screen window, no longer worked. Removal of all uses of the fl_window global variable from platform-independent code remains necessary, because this variable is ill-defined in the Wayland/X11 library.
2022-08-29Make hybrid Wayland/X11 platform.ManoloFLTK
2021-11-16Add use of fl_capture_window() by test/deviceManoloFLTK
Also, rename fl_capture_window_part() to fl_capture_window().
2020-11-20Fix for issue #159 - continuedManoloFLTK
Changes here concentrate the fix within static function alpha_blend() and thus are visible only when drawing transparent images under X11 platform without Xrender.
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2019-06-06Add one argument to Fl_Screen_Driver::read_win_rectangle()ManoloFLTK
The new argument gives the window to be captured, or NULL to indicate capture from the current offscreen. Calling this function becomes easier because less dependent on global variables.
2019-04-10Function Fl_Screen_Driver::traverse_to_gl_subwindows() is static in its classManoloFLTK
2019-04-09Add public function Fl_RGB_Image *fl_capture_window_part()ManoloFLTK
In the context of HighDPI screens, the API of function fl_read_image() is inadequate because a rectangle of size WxH drawing units of a window may contain many more than W*H pixels. Function fl_capture_window_part() returns an Fl_RGB_Image object whose drawing size matches the size of the rectangle and whose data size matches the, possibly larger, size in pixels of the corresponding area of the mapped window.
2018-06-26Move Fl_Screen_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-10Fix error when running Doxygen (continued).Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12661 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-10Fix trivial typo that was upsetting doxygenIan MacArthur
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09Fix fl_read_image() under MacOS platform when GUI is rescaled.Manolo Gouy
This commit also simplifies the platform-dependent support of fl_read_image(): only Fl_XXX_Screen_Driver::read_win_rectangle() contains platform-specific code to capture pixels from the current window or from an offscreen buffer. Platform-independent function Fl_Screen_Driver::traverse_to_gl_subwindows() captures subwindows that intersect with the area fl_read_image() targets. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12653 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-06Fix Doxygen warnings.Albrecht Schlosser
There was one obvious warning in src/fl_read_image.cxx, but others have to do with incomplete code and platform specific definitions. I'm not entirely happy with these changes. Temporary changes have been marked with 'FIXME' and should be removed later if possible. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11547 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-03Remove "(if fl_window is null)" from Doxygen comment.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11519 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-03Rewrite fl_read_image.cxx under the driver model.Manolo Gouy
Files fl_read_image_mac.cxx and fl_read_image_win32.cxx are no longer used; their content is now in Fl_XXX_Screen_Driver.cxx git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11516 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-26Isolate the definition of the 3 public, OS-dependent types (Fl_Offscreen, ↵Manolo Gouy
Fl_Region, Fl_Bitmask). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11432 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-25Remove a bunch of useless #include <FL/x.H> directives.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11422 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-09Simpler code for capture of OpenGL windows: the pixel array is converted to ↵Manolo Gouy
top-to-bottom earlier. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11326 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13Details on PORTME items. Move fl_parse_color() to screen drivers.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11Mark places that need to be refactored with // PORTME:Matthias Melcher
Searching for __APPLE, WIN32 or X11 did give me many false results. I instead marked most ifdef's that I would like to get rid of with the text // PORTME:, so they can be easily found by a global search. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11155 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-04Created pseudo code for all FL_PORTED section so that FLTK compiles and ↵Matthias Melcher
links (Xcode, hello, other C flags: -D FL_PORTING -U __APPLE__ -U __APPLE_QUARTZ__) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-03Updated platform specific #if's to report unimplemented code when compiling ↵Matthias Melcher
with FL_PORTING defined and WIN32 and __APPLE__ undefined> git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-06Fix for STR#3142 where fl_read_image() correctly reads GL data under X11, ↵Manolo Gouy
but ignores them under MSWindows and Mac OS X. Moreover, fl_read_image() behaves differently with and without OS virtualization for X11 and MSWindows. The patched function reads whatever is in the rectangle transmitted in arguments, with and without GL data, with and without subwindows, on ‘true’ OS or on virtualized OS. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-22Fixed error in computation of when the window is not fully contained in the ↵Manolo Gouy
display. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-21Fixes STR# 2973: collection of Sun compiler fixes.Greg Ercolano
Applied str_2973_r9979_sun-fix-warnings-7.patch (with small mods) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19Modifications to all LGPL headers for STR #2685.Greg Ercolano
(to clarify static exception LGPL by changing license references) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-15Added Fl_Paged_Device::print_window() to print a window with its title bar ↵Manolo Gouy
and frame. Added Fl_Window::decorated_w() and Fl_Window::decorated_h() that return the size of a window with its title bar and frame. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8593 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28Fixed Copyright to 2010.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01Changed Copyright in 'src' directoryMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-19Improved stability of fl_read_image (STR #2021)Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16Doxygen documentation : took the opportunity to update copyright info as we ↵Fabien Costantini
modified already in batch almost all sources, added also a fil doxygen command to class headers to harmonize with original matt Fl_Widget dox. format. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-03-09STR 1891: fixing fl_read_image for double buffered windows.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6065 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-02-25STR #1716: Fixed image read for partial regions on X11Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6046 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16Update source file headers with STR web page.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21Image reading, template handling, and printing bug fixes.Michael R Sweet
CHANGES: - Add fl_read_image() note and move documentation STRs back to the top of the list... fluid/fluid.cxx: - Use printer choice data instead of the label text, since we have to escape / in printer names. - Change page number in header to n/N. fluid/print_panel.*: - Don't disable properties button, ever. - Quote / in printer names. - Put copy of real printer name in the user data. - Use user data instead of label text for printer name. fluid/template_panel.*: - Only free the files array if num_files > 0. src/fl_read_image.cxx: - Use fl_visual->visual->*_mask instead of fl_*mask and fl_*shift when the XGetImage() data does not have them set. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4157 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24Copyright updates.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-25Use fl_red/green/bluemask/shift for undefined pixmaps.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3399 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-24fl_read_image() fixes.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3397 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11Copyright updates and prep for 1.1.5rc1.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30Copyright update for 1.1.3 release (not quite yet, but soon...)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-30fl_read_image() - not implemented for WIN32 or OSX yet.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2269 ea41ed52-d2ee-0310-a9c1-e6b18d33e121