summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H
AgeCommit message (Collapse)Author
2025-09-19Underline does not appear in some fonts and scales (Windows,X11-noCairo) (#1308)ManoloFLTK
2025-09-19Underline does not appear in some fonts and scales (X11-noCairo) (#1308)ManoloFLTK
2025-05-09Remove declaration of Fl_Scalable_Graphics_Driver from FL/Fl_Graphics_Driver.HManoloFLTK
and declare it in non-public header src/Fl_Scalable_Graphics_Driver.H which also declares classes Fl_Font_Descriptor and Fl_Fontdesc.
2024-07-24Fix Fl_Scalable_Graphics_Driver::rect(x,y,w,h) (#1017)ManoloFLTK
2024-07-23Fix "line_style_doc program under X11: join type wrong" (#1017)ManoloFLTK
2023-01-01Add a missing FL_OVERRIDE flagAlbrecht Schlosser
2022-12-30Use `FL_OVERRIDE` for all overridden virtual methods (#611)Matthias Melcher
FL_OVERRIDE is defined as `override` for C++11 and higher FL_OVERRIDE is defined as `override` for VisualC 2015 and newer Don't interfere with Fl_Widget::override()
2022-11-29Fix for issue [Cairo]: Arrows have a "gap" (#561)ManoloFLTK
The problem to fix is that the arrow drawn by draw_arrow1() in src/fl_symbols.cxx displays a faint clear line between the stem and head of the arrow with the Cairo graphics driver. This occurs because draw_arrow1() draws the arrow in 2 steps (a rectangle + a triangle) and the Cairo driver is configured to use antialiasing when filling polygons. The antialiasing produces the faint line between stem and head. Why does draw_arrow1() draw a rectangle + a triangle rather than a 7-vertex polygon? That's because the X11 graphics driver fails with its polygon- drawing function when the polygon is also rotated: the polygon is drawn empty. We want to keep using antialiasing under Cairo for polygons because the result is better with non horizontal/vertical polygon edges. This implementation changes function draw_arrow1() which draws the arrow as a 7-vertex filled polygon except when the graphics driver returns false for its virtual member function can_fill_non_convex_polygon(). In that situation, draw_arrow1() draws, as before, a rectangle + a triangle. The new, virtual member function can_fill_non_convex_polygon() returns true except for the X11 graphics driver. Therefore, draw_arrow1() is effectively unchanged under the X11 driver.
2022-11-25Make Fl_XXX_Graphics_Driver::create_bitmask() a static member functionManoloFLTK
2022-08-29Make hybrid Wayland/X11 platform.ManoloFLTK
2022-08-20Remove FL_EXPORT qualifier from platform-specific class declarations.ManoloFLTK
2022-07-26Remove redundant Fl_Xlib_Graphics_Driver::scale_bitmap_for_PostScript() ↵ManoloFLTK
under USE_XFT=1.
2022-07-20Change prototype of virtual Fl_Graphics_Driver::pango_font_description().ManoloFLTK
2022-06-19Move input method support to Fl_Screen_Driver from Fl_Graphics_DriverManoloFLTK
2022-03-24Remove platform-dependent type Fl_Bitmask (not in documented public API).ManoloFLTK
2022-03-21Avoid using same name (p) for distinct members of derived classes.ManoloFLTK
2022-01-07Add virtual void Fl_Graphics_Driver::set_status() and implement for X11 ↵ManoloFLTK
platform.
2021-05-28New virtual member function Fl_Graphics_Driver::colored_rectf().ManoloFLTK
2021-03-26Remove X11-specific code from platform-independent Fl_PostScript.cxxManoloFLTK
2021-03-13Fast pango (#201)ManoloFLTK
* Cache single unicode character widths under Xft+Pango
2021-03-11Unification of scaled coordinate calculations in class ↵ManoloFLTK
Fl_Scalable_Graphics_Driver Most coordinate calculations are done with the new inline function int Fl_Scalable_Graphics_Driver::floor(int coord) that is used by both the Windows and X11 platforms.
2021-03-02X11 platform: Accurately control RGB image drawing with GUI scaling.ManoloFLTK
2021-03-01Remove duplicated code between derived classes of Fl_Graphics_Driver - cont'd.ManoloFLTK
2021-03-01Remove duplicated code between derived classes of Fl_Graphics_Driver.ManoloFLTK
2021-02-16Create classes Fl_XXX_Gl_Window_Driver according to driver model.ManoloFLTK
2020-10-28Pango ps (#148)ManoloFLTK
Use cairo-PostScript to output PostScript when pango is available. This allows to draw in vectorial form any script. Before, only the Latin script could be drawn to PostScript in vectorial form.
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-05-30X11+Pango: call pango_font_description_from_string() less oftenManoloFLTK
Previously, each time fl_font(fnum, fsize) was called, functions pango_font_description_free() and pango_font_description_from_string() would be called. Now, pango_font_description_from_string() is called only once, the first time an Fl_Font is used.
2018-12-04Define useful implementations of Fl_Graphics_Driver::push_no_clip() and ↵ManoloFLTK
pop_clip().
2018-06-27Remove a few useless 'friend' statements.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23Doxygen only: fixed all block comments starting with an asterisk to ↵Matthias Melcher
space-only, fixed doxygen keywords prepended with @ to use a backward slash instead. No code was changed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19Reorganise access to the value of the GUI scaling factor with public getter ↵Manolo Gouy
and protected, virtual setter member functions. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12858 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16Remove virtual member Fl_GraphicsDriver::mask_bitmap(char **) and its ↵Manolo Gouy
re-implementations. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12843 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-15Restore building for X11 with HAVE_XRENDER = 0Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12837 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-13Homogenise and simplify the API of Fl_Graphics_Driver::cache(image-type *) ↵Manolo Gouy
virtual member functions. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12Image drawing: simplify the code organisation to better support ↵Manolo Gouy
Fl_Image::scale(). Graphics drivers now use up to 6 virtual member functions to support Fl_Image drawing in the context of GUI and image rescaling : virtual void draw_pixmap(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) virtual void draw_bitmap(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) virtual void draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy) and virtual void draw_fixed(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) virtual void draw_fixed(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) virtual void draw_fixed(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12828 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-28Image classes: memorise the width and the height of the cached form of the ↵Manolo Gouy
image to support GUI scaling git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-19New member function Fl_Image::scale(int width, int height) to set the FLTK ↵Manolo Gouy
size of an image. Each image has now two sizes implemented as follows: - the pixel size is stored in private members pixel_w_ and pixel_h_ with public accessors pixel_w() and pixel_h() - the FLTK size is stored in private members w_ and h_ and read by w() and h() - when the image is constructed, the two sizes have the same value - the protected w(int) and h(int) member functions set both FLTK and pixel sizes. - the public scale(int, int) member function is essentially nothing but set the FLTK size and don't change the pixel size. - when the image is drawn, its FLTK size determines how big it is drawn, its pixel size determines how much data are available to draw it. FLTK 1.3.4 with FL_ABI_VERSION=10304 contained an equivalent member function but only for the Fl_Shared_Image class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12776 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-19Remove useless member function declaration.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12775 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15Improve X11 coordinate clipping.Albrecht Schlosser
Make clipping methods non-virtual so they can be inlined. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12753 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15Fix a potential internal stack overflow in Xlib graphics driver.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12752 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-13Improve and simplify X line and rect 16-bit clipping.Albrecht Schlosser
Back to 16-bit coordinate limit clipping (actually +/- (2**15 - 8). The clipping range is now constant, symmetrical, and stored in the driver object. Also fixed a bug in Liang-Barsky line clipping algorithm. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12744 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-09Improve X11 (16-bit) clipping of lines and rectangles.Albrecht Schlosser
In FLTK 1.3.x only horizontal and vertical long lines with endpoints outside the 16-bit coordinate space could be drawn with proper X11 coordinate clipping. Now arbitrary lines are clipped so they can be drawn with X11 functions. All rectangles are clipped as well (as in 1.3). Todo: The code needs better documentation and clipping of polygons, circles, curves etc. is still missing. The next step should be the clipping of polygons... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12725 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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
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-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-24X11 platform: cleaner implementation of changing the active drawing surface ↵Manolo Gouy
and maintaining clip regions. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12396 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