summaryrefslogtreecommitdiff
path: root/src/drivers/GDI
AgeCommit message (Collapse)Author
2018-02-07STR#3450: Draw text with OpenGL using textures on all platforms.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12650 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31Replace FL/x.H with FL/platform.H - step 2 (STR #3435).Albrecht Schlosser
This second step replaces FL/x.H with FL/platform.H in all source files. Dependencies have been adjusted as well. This commit completes the replacement of FL/x.H with FL/platform.H. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-05Some cleaning in commentsManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12621 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-19Fix Fl_GDI_Graphics_Driver::uncache(Fl_RGB_Image*,...) that did not delete ↵Manolo Gouy
correctly the cached offscreen object. This bug was detected by a test program that rotates an SVG image. But it's not related to SVG, and concerns any Fl_RGB_Image on the WIN32 platform. It was introduced when image support was modified according to the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12600 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-18STR#3320 continued: make sure there's no undrawn space between nested ↵Manolo Gouy
rectangles and images. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12595 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-18STR#3444: Add MacOS support for application rescaling (not quite complete)Manolo Gouy
With this, most MacOS FLTK app can be scaled with command/+/-/0/ keystrokes. A scaling problem remains, visible in test/cube, where the "Test" string is not positioned correctly. GLUT apps can also be scaled (across platforms). SVG images are re-rasterized after app scaling for optimal drawing. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12594 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-26WIN32: allow to change the active drawing surface between Fl_Display_Device ↵Manolo Gouy
and Fl_Image_Surface and keep the clipping region correct. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12401 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-25X11 and WIN32: slightly change Fl_XXX_Graphics_Driver::cache(Fl_Pixmap*) to ↵Manolo Gouy
use the Fl_Image_Surface object. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12399 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-20Simplify using Fl_XXX_Graphics_Driver::copy_offscreen() instead of ↵Manolo Gouy
Fl_Scalable_Graphics_Driver::copy_offscreen_unscaled() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-16class Fl_GDI_Image_Surface_Driver: remove member variable 'previous' that is ↵Manolo Gouy
useless. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-15Remove _sgc private member of Fl_GDI_Image_Surface_Driver that is not necessary.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12382 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-14Remove unnecessary #include statements and compilation guards.Albrecht Schlosser
Currently src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx wouldn't contribute any code to the lib, but it is kept for future extensions. This file is no longer compiled (see src/CMakeLists.txt and src/Makefile). Tested (only) under Windows and Linux. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12381 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07Define Fl_WinAPI_Screen_Driver::DWM_scaling_factor() only without ↵Manolo Gouy
FLTK_HIDPI_SUPPORT. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12298 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07WIN32 HiDPI support: fix copy and paste of image data when rescaling is applied.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12297 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07WIN32 HiDPI support: fix scaling support for Fl_Copy_Surface.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12295 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07Fix Fl_GDI_Graphics_Driver::point_unscaled() so points are also enlarged ↵Manolo Gouy
when scaling increases. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12294 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-28Fix code formatting and typos.Albrecht Schlosser
Added some braces around the bodies of one-statement for loops for clarity. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-27WIN32 platform: more progress for full HiDPI supportManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12273 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-18Advancing HiDPI support for the WIN32 platform - still incomplete.Manolo Gouy
It's still necessary to compile with -DFLTK_HIDPI_SUPPORT to activate the new HiDPI support. Default builds get the same HiDPI support as in FLTK 1.3 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-22Fix warnings: 'Fl_Xlib_Graphics_Driver::scale' hides overloaded virtual ↵Manolo Gouy
function [-Woverloaded-virtual] git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12242 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-05-06De-duplicate code to load pointer to the TransparentBlt() system function at ↵Manolo Gouy
run-time. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12234 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-05Fix erroneously cased include file namesManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12233 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-25Remove Fl_Translated_GDI_Graphics_Driver and have its functions performed by ↵Manolo Gouy
Fl_GDI_Graphics_Driver. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12227 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-25Add an argument to the private, virtual member function void ↵Manolo Gouy
Fl_Surface_Device::end_current_(). The X11 platform uses this argument to restore the correct clipping state after drawing to an Fl_Image_Surface object. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12226 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-09Simpler code path for a member function calling another member function of ↵Manolo Gouy
same class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12141 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-11-17WIN32 platform: Fix drawing of depth-4 scaled image when ↵Manolo Gouy
can_do_alpha_blending() is false. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12116 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-16Replace global fl_line_width_ used only by X11 platform by ↵Manolo Gouy
Fl_Xlib_Graphics_Driver::line_width_ git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12114 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-05Slightly improve the parameter list of member function int ↵Manolo Gouy
Fl_Graphics_Driver::start_image(...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12079 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-03Rename Fl_Bitmap::start() to Fl_Bitmap::prepare().Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12078 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-03Factorize repeated code across platform-specific graphics drivers and image ↵Manolo Gouy
types git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12077 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-02Replace declarations such as "friend class Fl_Xlib_Graphics_Driver;" by ↵Manolo Gouy
platform-independent declarations. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-30Replace erroneous bitwise & by logical &&Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-30Add virtual Fl_RGB_Image* Fl_Image::as_rgb_image() to detect whether an ↵Manolo Gouy
Fl_Image is derived from Fl_RGB_Image git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12061 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-22WIN platform: implement Fl_GDI_Graphics_Driver::draw_scaled(Fl_Image ↵Manolo Gouy
*img,int,int,int,int) when img is a Fl_RGB_Image Implementation uses StretchBlt() when img->d() is 1 or 3 and AlphaBlend() when it is 2 or 4. This should turn useful to draw images on HighDPI displays using the display's true resolution. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12053 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-06 Correct function Fl_GDI_Graphics_Driver::gc(void*) that did not update the ↵Manolo Gouy
global variable fl_gc correctly. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12017 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-23Move font-related member functions from Fl_Screen_Driver to Fl_Graphics_Driver.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-22Rewrite Fl::set_fonts(), Fl::get_font_sizes(), Fl::get_font_name() under the ↵Manolo Gouy
driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11965 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-27Fix Fl_Copy_Surface under Windows 10 when the desktop scaling factor value ↵Manolo Gouy
is > 100 % git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11899 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-24Add missing delete statements in ~Fl_XXX_Copy_Surface_Driver() and ↵Manolo Gouy
~Fl_XXX_Image_Surface_Driver(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11891 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-26Set svn file properties.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11700 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-17MSWindows fixes for previous commits.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-17virtualized some Region calls.Matthias Melcher
There is a deeper issue here: regions should be handled by the graphics driver that is associated with the Fl_Window of this widget... . git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11643 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-17virtualized Fl::set_color and free_color.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11642 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-17virtualized Fl_Graphics_Driver::global_gc(), a function that should probably ↵Matthias Melcher
not exeist. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-17virtualizes fl_set_spot and fl_reset_spotMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-12Rewrite fl_draw_pixmap.cxx under the driver model.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11587 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-09Fix typos.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11560 ea41ed52-d2ee-0310-a9c1-e6b18d33e121