Commit Graph

8096 Commits

Author SHA1 Message Date
Manolo Gouy
c82fca51fa Windows: avoid changing the current Fl_Surface_Device when drawing an Fl_Double_Window.
This change was previously attempted at r.12792 but the test/offscreen demo did not run well with it.
This commit fixes the problem: the global fl_window should not be changed when drawing to
an Fl_Double_Window.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-24 10:45:30 +00:00
Manolo Gouy
ece56437a6 Undo change at r12792 (24 march 2018) because test/offscreen does not work with it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12867 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-23 16:04:09 +00:00
Manolo Gouy
50c3568aff Complete Fl_Android_Graphics_Driver::cache() functions that should assign the image's cache_w_ and cache_h_ member variables.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-21 06:22:27 +00:00
Manolo Gouy
de4026aeca Fix Fl_GDI_Graphics_Driver::cache(Fl_Pixmap *) where 2 distinct Fl_GDI_Graphics_Driver objects should be used in the right way.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12865 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-20 12:37:08 +00:00
Manolo Gouy
7e234e3abc Remove debugging statement
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12863 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-20 09:04:24 +00:00
Manolo Gouy
de762fca2b Fix direct use of fl_draw_pixmap() whithout Fl_Pixmap object.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12862 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-20 08:46:49 +00:00
Manolo Gouy
bd9a57be29 Fix background color when drawing pixmap data both directly or as an Fl_Pixmap object.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12860 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19 13:51:17 +00:00
Manolo Gouy
374ea9e9eb Fix handling of bg argument of fl_draw_pixmap(char**, int , int , Fl_Color bg) during direct drawing of pixmap image data.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12859 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19 13:14:37 +00:00
Manolo Gouy
54b697cd49 Reorganise access to the value of the GUI scaling factor with public getter 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-19 10:39:46 +00:00
Manolo Gouy
d375918a5e Documentation: place Doxygen doc next to function implementation
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12857 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19 08:43:19 +00:00
Manolo Gouy
eb3664edf1 Documentation: add doc for Fl_Graphics_Driver::cache_size()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12856 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19 08:29:33 +00:00
Manolo Gouy
0196998ea6 Documentation: simplify example code for Fl_Image::scale()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12855 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19 07:46:44 +00:00
Albrecht Schlosser
5bba4776ae Fix documentation formatting.
Move image out of 'note'.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12854 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19 07:20:01 +00:00
Greg Ercolano
8c32c708a9 Clarified the fl_choice ordering in first example with an image and arrows,
as it's not clear in the text how the code order is reversed on-screen.

Also, the whole 'three musketeers' thing with the case values not matching
the numeric button names has always been confusing:

     case 0: .. // One
     case 1: .. // Two (default)
     case 2: .. // Three

Changed that so it's a Zero/One/Two example instead.

     case 0: .. // "Zero"
     case 1: .. // "One" (default)
     case 2: .. // "Two"



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12853 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18 18:28:46 +00:00
Manolo Gouy
71d23d5574 Add comments: "Implementation note about how Fl_Pixmap objects get printed under Windows"
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12852 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18 15:36:45 +00:00
Manolo Gouy
15e3f4b2d2 Simplify the implementation of printing of Fl_Pixmap images under Windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12851 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18 15:03:51 +00:00
Manolo Gouy
231e0edff6 Fix crash in test/device after scale-GUI + Fl_Printer + Fl_Image_Surface
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12850 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18 14:41:54 +00:00
Albrecht Schlosser
c79f82edd1 Fix Fl_Text_Editor overstrike mode (STR #3463).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18 13:20:15 +00:00
Greg Ercolano
6ada360174 Docs for fl_choice() clarify argument order, added missing image for one of the examples.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12847 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18 09:52:00 +00:00
Manolo Gouy
2bae646a3c Only fix correct indenting of function fl_convert_pixmap()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12846 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-17 06:53:28 +00:00
Manolo Gouy
c5ab11bbec Comments only: extend "Implementation note about image drawing" to describe the mask_bitmap virtual member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 13:21:54 +00:00
Matthias Melcher
447e33c607 Getting rid of warning in Xcode 9.3
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12844 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 13:06:31 +00:00
Manolo Gouy
26aabc91e1 Remove virtual member Fl_GraphicsDriver::mask_bitmap(char **) and its re-implementations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12843 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 13:00:29 +00:00
Manolo Gouy
9b01ff63e7 Remove Fl_PostScript_Graphics_Driver::mask_bitmap(char **) that is useless.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12842 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 10:43:28 +00:00
Manolo Gouy
e85fd31f54 Comments only: complete "Implementation note about image drawing" about how to destroy cached images.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12841 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 08:03:16 +00:00
Manolo Gouy
a70846730b Add Fl_Android_Graphics_Driver::delete_bitmask() needed to uncache a cached Fl_Bitmap image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12840 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 07:59:49 +00:00
Manolo Gouy
f089bd6445 Remove useless re-implementation of this virtual member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12839 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-16 07:56:52 +00:00
Manolo Gouy
ecc1f90506 Comments only: extend the description of how Fl_Graphics_Driver derived classes support image classes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12838 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-15 06:44:50 +00:00
Manolo Gouy
dbc37a29c0 Restore building for X11 with HAVE_XRENDER = 0
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12837 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-15 05:53:01 +00:00
Manolo Gouy
25d39c1b57 Remove useless 'friend' statements from class Fl_Graphics_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-14 15:26:42 +00:00
Manolo Gouy
82e70fae04 Comments only: more extensive explanation of how virtual member functions of Fl_Graphics_Driver can support image drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12835 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-14 15:10:59 +00:00
Manolo Gouy
bfac5462be Remove Fl_Pixmap::prepare() and Fl_Bitmap::prepare() that were used only once.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12834 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-14 13:37:47 +00:00
Manolo Gouy
2abe8bd413 Homogenise and simplify the API of Fl_Graphics_Driver::cache(image-type *) virtual member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-13 13:22:15 +00:00
Manolo Gouy
e440b8859f Simplify code for image drawing by PostScript graphics driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12832 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-13 11:50:20 +00:00
Albrecht Schlosser
4a0c13ac34 Update 'examples' (test) documentation, add images.
Add missing documentation of demo programs in the 'test' directory.
Some images were added as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12831 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 19:56:34 +00:00
Manolo Gouy
dcaf201239 SVG support: improve printed SVG images by increasing the resolution when printing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12830 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 15:51:50 +00:00
Manolo Gouy
178343b2ee Image drawing: simplify the code organisation to better support Fl_Image::scale() - continued
This completes changes introduced at r.12828.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12829 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 14:54:53 +00:00
Manolo Gouy
16705ef734 Image drawing: simplify the code organisation to better support 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-04-12 13:07:00 +00:00
Albrecht Schlosser
efc3ec1b7b Remove unnecessary dependency on FL/Fl_Rect.H.
Fl_Rect.H is no longer included by Fl_Group.H to avoid unnecessary
dependencies on Fl_Rect.H. Currently it is only needed to access the
array returned by the protected method bounds().

Also clarified documentation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12827 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 12:58:10 +00:00
Albrecht Schlosser
5e98a9e292 Remove unused variable, update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 21:10:53 +00:00
Albrecht Schlosser
e71fc7e4c3 Document Fl_Rect::r() and b() to be outside the rectangle.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12825 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 18:41:34 +00:00
Greg Ercolano
c7080e826e General description: mention how to move items around
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12824 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 18:37:18 +00:00
Manolo Gouy
798823f7dc X11: Fix drawing of sliders with gtk+ scheme and GUI scaling >= 2 -- continued
Other places where line_delta_ is to be used.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12823 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-05 21:05:08 +00:00
Greg Ercolano
bf0c9d4c6a Added global Fl::visible_focus() checkbox.
Also fixed tab navigation order of some widgets, and +/1 heights with a few checkboxes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12822 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-05 19:52:37 +00:00
Manolo Gouy
43000a228c X11: Fix drawing of sliders with gtk+ scheme and GUI scaling >= 2 that left footprints when moved.
The fix is to use the X11 graphics driver's line_delta_ private member variable also when drawing complex
shapes with fl_begin_loop(). The gtk+ scheme does use fl_begin_loop() to draw its frames.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12821 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-05 12:23:07 +00:00
Greg Ercolano
fe6499790a Fixes STR #3459.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12820 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-02 18:28:42 +00:00
Matthias Melcher
532099da23 Android: Drawing RGB and monochrome image data on the fly from a buffer. Untested.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-01 16:16:12 +00:00
Matthias Melcher
f49267e85b Android: Drawing RGB image data on the fly via callback
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12818 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-01 16:06:12 +00:00
Matthias Melcher
936fbd096f Android: Drawing RGB image data (and probaly rgba and grayscale as well). Testing unsing test/color_chooser.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12817 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31 21:29:33 +00:00
Greg Ercolano
e4916d617e Added mention of the new Fl::menu_linespacing() in the Fl_Menu_ docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31 17:29:23 +00:00