summaryrefslogtreecommitdiff
path: root/src/Fl_Image_Surface.cxx
AgeCommit message (Collapse)Author
43 hourswipmaxim nikonov
2023-12-21Fix a typo, trailing whitespace, and dependenciesAlbrecht Schlosser
2023-12-07Document Fl_Image_Surface::mask() with commented code exampleManoloFLTK
2023-12-04New member function Fl_Image_Surface::mask(Fl_RGB_Image*)ManoloFLTK
2023-11-12 Fix: Potential NULL pointer dereference in Fl_Image_Surface c'tor (#834)ManoloFLTK
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-08-29Make hybrid Wayland/X11 platform.ManoloFLTK
2021-03-21Remove unnecessary system includes from public headersAlbrecht Schlosser
Add includes of system headers in the implementation files where necessary.
2020-10-14Minor fix in doc of the Fl_Image_Surface constructor.ManoloFLTK
2020-09-18Improve Fl_Menu_Item docs and inline deprecated methodsAlbrecht Schlosser
The deprecated methods are now calling the new methods to be entirely compatible. These methods should be removed in 1.5.0 (fix unrelated whitespace as well)
2020-09-18More detailed doc of Fl_Image_Surface::image()ManoloFLTK
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-11-07Reorganise use of virtual member function Fl_Surface_Device::end_current()ManoloFLTK
2019-04-11Remove 2 Doxygen warningsManoloFLTK
fltk-1.4/src/Fl_Copy_Surface.cxx:66: warning: no uniquely matching class member found for int Fl_Copy_Surface_Driver::printable_rect(int *w, int *h) and same for Fl_Image_Surface_Driver.
2019-04-10New virtual member function bool Fl_Surface_Device::is_current()ManoloFLTK
2019-03-26Use \deprecated Doxygen command where necessaryManoloFLTK
2018-08-06Add missing FL_EXPORT statements.Albrecht Schlosser
This fixes a regression causing 'fluid-shared' build to fail (only if configured with --enable-shared, obviously). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13006 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23Doxygen: created Group to document drivers, disabled by defaultMatthias Melcher
Uncomment `ENABLED_SECTIONS += DriverDev` in documentation/Doxyfile.in to enable driver documentation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-25Rewrite static function Fl_Image_Surface::rescale(Fl_Image_Surface*&) as ↵Manolo Gouy
member function Fl_Image_Surface::rescale(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-14Remove useless #include directives.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12922 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-07New Fl_Image_Surface::rescale() class function and document equivalence ↵Manolo Gouy
between Fl_Offscreen-based and Fl_Image_Surface-based approaches. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12907 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-06Deprecate Fl_Image_Surface::highres_image() because ↵Manolo Gouy
Fl_Image_Surface::image() is enough now images are scalable. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12905 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-06Make member function Fl_Image_Surface::get_offscreen_before_delete() be private.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12904 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-30Extend documentation of fl_begin_offscreen()Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12885 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-26Documentation: complete doc of Fl_Image_Surface::offscreen()Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12875 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-26Simplify API for Fl_Image_Surface::Fl_Image_Surface(int w, int h, int ↵Manolo Gouy
high_res, Fl_Offscreen off) with non-null offscreen. The caller no longer needs to call Fl_Image_Surface::get_offscreen_before_delete() before object deletion, because the object destructor knows the offscreen has not been created by the Fl_Image_Surface constructor. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12874 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11Documentation: homogenize to 'scale factor' and 'drawing unit'Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12737 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11Documentation of fl_create_offscreen: give more details useful because the ↵Manolo Gouy
screen scale factor can now vary. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12736 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11Documentation: homogenize uses of "FLTK units" and "drawing units".Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12734 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-26Continue support for GUI rescaling under MacOS: fix fl_XXX_offscreen() ↵Manolo Gouy
functions and Fl_Image_Surface class git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12605 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-24Update the doc of the Fl_Image_Surface constructor to reflect HiDPI support ↵Manolo Gouy
by the WIN32 and X11 platforms. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12469 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-18Add void fl_scale_offscreen(Fl_Offscreen &ctx) to support the rescaling of ↵Manolo Gouy
an offscreen buffer. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12240 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-17Introduce HiDPI + rescaling support for the X11 platform (+ partial support ↵Manolo Gouy
for WIN32) Corresponds to STR #3320 1) HiDPI support consists in detecting the adequate scaling factor for the screen on which FLTK maps a window, and scaling all FLTK units by this factor. FLTK tries to detect the correct value of this factor at startup (see more details below). Environment variable FLTK_SCALING_FACTOR can also be used to set this value. 2) Rescaling support consists in changing the scaling factor of all FLTK windows in reply to ctrl/+/-/0/ keystrokes. More details for the various platforms : - X11: Support is very advanced. Some details need still to be improved. Automatic detection of the correct starting value of the scaling factor works well with the gnome desktop. The present code contains no support for this on other desktops. FLTK_SCALING_FACTOR provides a workaround. -WIN32: Support is incomplete at this point, although many test applications have partial or complete HiDPI and scaling support. The current value of the system's scaling factor is correctly detected at application startup. Apps respond to changes of this value in real time. Support needs to define the FLTK_HIDPI_SUPPORT preprocessor variable at compile time. This way, standard builds produce a code with the default WIN32 HiDPI support, that is, where all graphics goes to an internal buffer that gets enlarged by the system and then mapped to the HiDPI display. To experiment with (or develop) the new HiDPI support requires a modified build procedure in which FLTK_HIDPI_SUPPORT is defined at compile time. When the support will be complete, the requirement for the definition of this preprocessor variable will be removed. The present commit contains support for a single scaling factor. Eventually, per-screen scaling factors should be implemented, as done for X11. - MacOS: this commit does not give new HiDPI for this platform. Eventually, window rescaling in reply to command/+/-/0/ is desirable. Per-screen scaling factor makes no sense on this platform because the OS itself takes care of the difference between the resolutions of traditional and retina displays. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-24Slight improvement of Fl_Image_Surface::image()Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12224 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-24Allow the use of Fl_Image_Surface::image() also when the Fl_Image_Surface ↵Manolo Gouy
object is not the current drawing surface. This fixes an issue uncovered in a thread of fltk.general entitled fl_pop_clip: clip stack underflow! warning on X11 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12222 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-16Improve Fl_Graphics_Driver::copy_offscreen() so it accepts an Fl_Offscreen ↵Manolo Gouy
argument even if not created by fl_create_offscreen(). With this, fl_copy_offscreen() can be used with any drawing surface (e.g., PostScript) and any Fl_Offscreen argument (e.g., returned by Fl_image_Surface::offscreen()). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12148 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-09Doxygen: more detailed descriptions of Fl_Image_Surface::offscreen() and ↵Manolo Gouy
Fl_Image_Surface::get_offscreen_before_delete(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12142 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-07Add static void Fl_Surface_Device::push_current(Fl_Surface_Device ↵Manolo Gouy
*new_current) and pop_current() to set/unset the current drawing surface. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-30Remove Fl_Image_Surface::end_current() to be called after usage of the ↵Manolo Gouy
drawing surface. This ensures API compatibility with FLTK 1.3 where Fl_Surface_Device->set_current() is used to change the current drawing surface. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12125 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-05-22Fix compiler warnings.Albrecht Schlosser
FL/platform_types.h: C++ style comments are not allowed in ISO C90. src/Fl_Help_View.cxx: type qualifiers ignored on function return type. src/Fl_Image_Surface.cxx: (Linux) converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null] Line #70: In member function ‘Fl_Offscreen Fl_Image_Surface::offscreen()’ git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11748 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-27Add test to avoid null pointer crashes.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11704 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-27Add tests to avoid null pointer errorsManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11703 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-24Add Doxygen comments for members of the Fl_Graphics_Driver class.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11689 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-16Modify the FL_PORTING pragma message to make clear implementation is optional.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11627 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-19(hopefully) Final driver-based rewriting of the Fl_Image_Surface class.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11371 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-10Remove redundant recursion (as suggested in [fltk.coredev] [porting] Remove ↵Manolo Gouy
redundant recursion) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11335 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-07Fix PicoSDL.Matthias Melcher
Fixed some issues with Image_Surface and Copy_Surface for PicoSDL. Still have to virtualize the driver concept. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-06New, driver-based Fl_Double_Window implementation.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11303 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-05Remove warning message about signed/unsigned comparison.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11290 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-05Complete the platform-neutral implementation of fl_XXX_offscreen() functions.Manolo Gouy
It is necessary to have a stack of the fl_begin_offscreen() calls, so that nested such calls apply fl_end_offscreen() to the matching fl_begin_offscreen(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11289 ea41ed52-d2ee-0310-a9c1-e6b18d33e121