Commit Graph

44 Commits

Author SHA1 Message Date
Albrecht Schlosser 76a2c95f07 Fix a typo, trailing whitespace, and dependencies 2023-12-21 14:03:04 +01:00
Albrecht Schlosser 855a50a5f6 Fix MSVC compiler warning 2023-12-17 18:05:36 +01:00
ManoloFLTK 3e61ec7044 New member function Fl_Image_Surface::mask(Fl_RGB_Image*) 2023-12-04 12:34:44 +01:00
Matthias Melcher 44c874b731
Use `FL_OVERRIDE` for all overridden virtual methods (#611)
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-12-30 19:14:36 +01:00
Albrecht Schlosser 8334abe544 Fix whitespace errors (no code changes)
(1) convert tabs to spaces
(2) remove trailing whitespace
2021-12-06 19:56:40 +01:00
ManoloFLTK 4a2833b104 Clearer GUI for test/device 2021-11-18 10:57:12 +01:00
ManoloFLTK 397226b75d Add use of fl_capture_window() by test/device
Also, rename fl_capture_window_part() to fl_capture_window().
2021-11-16 15:03:36 +01:00
Albrecht Schlosser 6ac305a508 Remove compiler warnings '-Wextra-semi' (see also PR #266)
I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows
(cross-compiled on Linux) and removed all "extra semicolon" warnings
I could find. I didn't check on macOS (yet).

Note: Linux configured with and w/o Pango but not w/o Xft. Compilation
with other options (e.g. Cairo) might still emit such warnings.
2021-08-27 14:52:43 +02:00
Albrecht Schlosser 64296707d9 Include bitmap files rather than copying the source code
There's no need to blow up the source file by including the bitmap
file literally in the source code. Use '#include' instead.

Another benefit is that the original source file is referenced in
the source code so it is not accidentally removed.
2021-05-08 15:23:17 +02:00
ManoloFLTK 0d594319c1 Add extra argument to Fl_SVG_File_Surface constructor.
This makes processing of the underlying FILE object consistant by classes
Fl_SVG_File_Surface, Fl_EPS_File_Surface and Fl_PostScript_File_Surface.
2020-11-03 18:05:18 +01:00
ManoloFLTK 8accc6e840
Pango ps (#148)
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-10-28 17:19:05 +01:00
ManoloFLTK c57eeada70 Fix position of the "Return" button. 2020-09-07 08:36:13 +02:00
ManoloFLTK 2984fe638c Fix for building without print support (GitHub issue #98). 2020-07-11 12:21:25 +02:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- 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.
2020-07-06 20:28:20 +02:00
ManoloFLTK 26e6c3f930 Add classes Fl_SVG_File_Surface and Fl_EPS_File_Surface to draw to SVG and EPS.
Test programs device and pixmap_browser use these new classes.
Class Fl_SVG_File_Surface can be optionally made non functional using the
--disable-svg configure option or turning off OPTION_USE_SVG in CMake.
Class Fl_EPS_File_Surface can be optionally made non functional using the
--disable-print configure option or turning off OPTION_PRINT_SUPPORT in CMake.
2020-06-27 09:56:00 +02:00
ManoloFLTK 2878fa95ab Add optional argument to Fl_Printer::begin_job() to inform caller when an error occurs.
This solves an issue raised in fltk.general :  Fl_Printer errors - how can I interpret them?
    https://www.fltk.org/newsgroups.php?s38419+gfltk.general+v38427
2020-04-22 16:01:33 +02:00
ManoloFLTK 2990717d6e Implement Fl_Window::icon() and default_icon() for macOS
The implementation is effective for macOS 10.10 and above.
Demo program test/device uses the new implementation.
2020-01-11 14:57:58 +01:00
Manolo Gouy 396e4f41cf Check also proper RGB image deletion after use.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12924 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-22 08:39:39 +00:00
Manolo Gouy c6109d9a18 Deprecate Fl_Image_Surface::highres_image() because 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-06 15:59:08 +00:00
Manolo Gouy 43935dffeb Add static void Fl_Surface_Device::push_current(Fl_Surface_Device *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-12-07 15:09:52 +00:00
Manolo Gouy e5d53b026c Test program "device": add several calls to image destructors to exercise them.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-30 07:12:29 +00:00
Manolo Gouy f4ec7192a9 Add tests to avoid null pointer errors
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11703 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-27 16:42:20 +00:00
Manolo Gouy a1de05784b Fix position in window of string "Line styles".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11611 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-15 08:06:47 +00:00
Manolo Gouy a22791b691 Have the device demo operate also the Fl_PostScript_File_Device class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11527 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-04 11:31:51 +00:00
Manolo Gouy 0b406baa0f Rewrite all fl_XXX_offscreen() functions so they use an Fl_Image_Surface object.
These functions become therefore platform-independent.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-27 13:52:27 +00:00
Manolo Gouy 14759eb387 Mac OS platform: make fl_draw_image() draw correctly depth-4 images with transparent areas.
This simplifies the drawing of Fl_Pixmap's.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11214 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-25 07:01:10 +00:00
Manolo Gouy bc83464b64 Add Fl_Shared_Image *Fl_Image_Surface::highres_image() to draw into high-resolution bitmap.
This new member function returns a high resolution bitmap image scaled to the adequate
 drawing size. This allows to create a bitmap image able to fill all pixels of a high resolution
 display. This is functional only for the Mac OS platform. On other platforms, 
 the new member function returns an unscaled bitmap.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11158 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-12 11:49:32 +00:00
Albrecht Schlosser 0a6be0a83f Fix compiler warnings (STR 2988), porting from branch-1.3.
This commit is the accumulated patch introduced in branch 1.3
in svn r 11094, 11095, and 11096.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 04:33:54 +00:00
Manolo Gouy eeb65bef23 1) Replicate in branch-1.3-porting all recent changes of branch-1.3
2) Advance branch-1.3-porting with new function Fl_X::capture_titlebar_and_borders()
that contains all the platform-specific code of all operations related to drawing
window borders and title bars. What is platform-specific and what is not
is therefore much clearer, to ease porting.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11002 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-10 19:08:16 +00:00
Manolo Gouy b0696db39a Added new method Fl_Copy_Surface::draw_decorated_window()
that copies a window to the clipboard together with its title bar and borders.
This requires very little new code because the capture of window decorations
is shared with the Fl_Paged_Device::print window() method.
The device test program is changed to call the new method.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10928 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-24 14:26:52 +00:00
Manolo Gouy baf5ea7d56 Added Fl_Copy_Surface::w() and Fl_Copy_Surface::h() member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-08 18:10:35 +00:00
Manolo Gouy 07dd8ba328 Added copy/paste from/to FLTK applications of graphical data.
Added Fl_Image_Surface class to draw into an Fl_Image object.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10159 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-23 16:47:21 +00:00
Greg Ercolano 4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(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-07-19 04:49:30 +00:00
Matthias Melcher 07cb1667ad Formatting
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 15:11:18 +00:00
Matthias Melcher 189a563ef0 Fixed Copyright (another try - sorry!)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8812 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 15:05:00 +00:00
Matthias Melcher a998fa5114 Fixed Copyright (damn, why does it not updae the ID?)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 15:02:55 +00:00
Matthias Melcher fb1f981c39 Fixed Copyright (2
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8810 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 15:02:14 +00:00
Matthias Melcher 5415e0ec09 Fixed Copyright
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 15:01:30 +00:00
Manolo Gouy 1ad8cf320d Fixed a problem in the WIN32 version of Fl_Paged_Device::print_window_part() and
Fl_Paged_Device::print_window() where the window didn't redraw well in some
cases after printing.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8606 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18 20:47:32 +00:00
Albrecht Schlosser b4c15eb8ae Fixed a few GNU compiler warnings (-pedantic): C++ comments in C files,
extraneous ';' and ',' and an invalid cast.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8263 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-11 20:52:38 +00:00
Albrecht Schlosser 8c56fc7e22 Updated CMake files with patches from Michael Surette (STR #2317).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7919 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-30 10:34:43 +00:00
Matthias Melcher 421f908c69 Bringing supported IDEs to the newest setup, add device and others.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-27 08:51:54 +00:00
Manolo Gouy bddd495ab4 Removed commented out statement.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-20 08:37:03 +00:00
Albrecht Schlosser 998cc6df52 Merge of branch-1.3-Fl_Printer, with the following main changes:
(1) adding Fl_Device class (and more) for device abstraction
 (2) adding Fl_Pinter class (and more) for printing support.

Todo: Code cleanup, update dependencies, remove/replace test print window.
I'm looking into converting the test window popup in a global shortcut
that would pop up the print dialog now...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7263 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-14 18:07:24 +00:00