Commit Graph

7939 Commits

Author SHA1 Message Date
Greg Ercolano
2a41af1fc3 Applied Manolo's recommendation (fltk.coredev), removing unnecessary item->image(*pixmap) call.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 18:12:58 +00:00
Greg Ercolano
88204a5524 Added example code to demonstrate Fl_Multi_Label for STR#3400.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12440 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-11 00:50:06 +00:00
Albrecht Schlosser
b0a2223642 Fix compiler warning and potential error in PNG error handling.
Compilation with gcc -Wall -Wextra displayed the following warning:

Fl_PNG_Image.cxx: In member function ‘void Fl_PNG_Image::load_png_(const char*, const unsigned char*, int)’:
Fl_PNG_Image.cxx:118:9: warning: variable ‘fp’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]

Making the variable static and initializing it properly avoids this
potential error in the PNG lib's error handling.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12439 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-10 11:38:23 +00:00
Manolo Gouy
4a8e829f09 Set svn ps for this new file.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12438 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 15:58:22 +00:00
Manolo Gouy
c0cc3d4160 These files are no longer used. They are replaced by nanosvg.h and nanosvg.diff.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12437 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 15:53:10 +00:00
Manolo Gouy
9dfef1c5f7 Differences between the FLTK-modified and the nanosvg versions of file nanosvg.h
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 15:51:06 +00:00
Manolo Gouy
a0e7cbfa57 Fix nanosvg implementation of nsvg__atof() to allow compilation with Visual Studio 7.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12435 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 15:47:04 +00:00
Manolo Gouy
a03f8490e6 #include <locale.h> is no longer needed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12434 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 12:52:39 +00:00
Manolo Gouy
8e558595e6 Make virtual member function Fl_Image::draw_scaled(int X, int Y, int W, int H) protected rather than private.
Consequently, remove the trailing _ from its name reserved for private class members.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12433 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-09 12:35:06 +00:00
Albrecht Schlosser
ae983b74f2 Enhance howto-drag-and-drop example program.
Refer to discussion if fltk.general, thread "Drag and drop issue"
in August September 2017.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12432 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-08 15:02:04 +00:00
Manolo Gouy
0bf5f9809a Modify nanosvg.h to support compilation by Visual Studio 7.
This is a new implementation that does not tamper with the program's locale.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12431 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-07 20:16:08 +00:00
Manolo Gouy
a222837123 Simplify code using plain atof() instead of implementing function nsvg__atof().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12430 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 19:38:56 +00:00
Greg Ercolano
457fb7c0b2 Changed AC_CHECK_HEADER -> AC_CHECK_HEADERS, since two files are being tested, e.g.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12429 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 18:06:30 +00:00
Greg Ercolano
3ef0e0d1c4 Small fix to remove an extra paren introduced in r12153
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12428 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 17:49:05 +00:00
Manolo Gouy
d5cc04b2bc Set svn ps for this new file
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12427 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:52:10 +00:00
Manolo Gouy
d383b82e7e Gives differences between FLTK and original versions of file nanosvg.h
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12426 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:51:14 +00:00
Manolo Gouy
a2d9a6a6c4 Return fl_nanosvg.h close to nanosvg.h, without reformatting.
fl_nanosvg.h had before been reformatted by Xcode.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12425 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:49:05 +00:00
Manolo Gouy
0dd8392ae9 Set svn ps for this new file
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12424 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:38:11 +00:00
Manolo Gouy
950ec3e863 Modify how the nanosvg source code is used to support compilation with Visual Studio 7.
1) The original nanosvg.h file is modified for FLTK in file fl_nanosvg.h. The only change is
to remove the implementation of function nsvg__atof().

2) FLTK provides an implementation	of nsvg__atof() based on sscanf().

3) FLTK changes the LC_NUMERIC locale to "C" before calling nanosvg
and resets it to its previous state after.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12423 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 16:25:42 +00:00
Greg Ercolano
16f968b40f Added the new OPTION_USE_NANOSVG to the README.CMake.txt file.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12422 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-06 00:02:33 +00:00
Greg Ercolano
a4433ca19d Emphasize in the docs that ".." at the end of cmake commands is
not an elipsis, but is part of the command.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12421 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-05 22:37:07 +00:00
Manolo Gouy
276b8255e2 Improve doc of the Fl_SVG_Image public constructor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12420 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 08:38:06 +00:00
Manolo Gouy
dd9f32c3f5 Fix typo in documentation of Fl_SVG_Image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12419 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 08:30:19 +00:00
Manolo Gouy
c42b4717a9 Fix erroneous Doxygen command in doc of Fl_SVG_Image::resize().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12418 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 08:06:26 +00:00
Manolo Gouy
722faf50cf Class Fl_SVG_Image: use fl_fopen() to open files with non-ASCII characters in name.
Also, have copy() copy the value of the image's proportional member variable.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12417 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-04 07:55:21 +00:00
Manolo Gouy
8f81b81beb Annonce the new Fl_SVG_Image class and related configure/CMake options.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12416 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 14:20:31 +00:00
Manolo Gouy
d6349e180a Set svn:keywords
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12415 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:20:52 +00:00
Manolo Gouy
227b040590 Set eol-style to native.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12414 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:18:07 +00:00
Manolo Gouy
1a28d85dc3 Add new Fl_SVG_Image class to support scalable vector graphics images using the (modified) nanosvg software.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:14:25 +00:00
Manolo Gouy
da31ff4569 Add the nanosvg directory to hold source code belonging to the nanosvg software.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12412 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-03 13:13:53 +00:00
Manolo Gouy
df8c9ba80c Add missing default values for virtual member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12411 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 17:44:09 +00:00
Manolo Gouy
eae09e7fa0 Create virtual Fl_Image::draw_scaled_(int X, int Y, int W, int H) and its implementations for image classes.
This allows to use the virtual function mechanism to adapt scaled image drawing both to the
image type and the graphics driver type.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12410 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 15:49:58 +00:00
Manolo Gouy
1b77509133 Modify Fl_Shared_Image::scale(int, int) for the case of an erroneous image object.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12409 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 10:21:56 +00:00
Manolo Gouy
6ac3d87d31 Move Fl_Graphics_Driver::draw(Fl_Shared_Image* from Fl_Shared_Image.cxx to Fl_Graphics_Driver.cxx where it belongs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12408 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 09:10:40 +00:00
Manolo Gouy
9fc2d43102 Improve Doxygen comments related to image drawing
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12407 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-30 08:59:50 +00:00
Albrecht Schlosser
fa5851b292 Fix typos (comments and documentation).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12406 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-28 11:10:01 +00:00
Manolo Gouy
52249a960d Associate gl_font() and gl_draw() calls.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12405 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-27 08:01:55 +00:00
Manolo Gouy
ab7c915bf0 Fix for STR#3397: find adequate X font to use it with GL.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12404 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-27 07:58:38 +00:00
Manolo Gouy
04565cdcad Fl_WinAPI_Window_Driver::capture_titlebar_and_borders(): remove a few unnecessary statements.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12402 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-26 14:15:20 +00:00
Manolo Gouy
1fdf15d8eb WIN32: allow to change the active drawing surface between Fl_Display_Device 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-26 14:10:56 +00:00
Manolo Gouy
a57381e804 Fl_Scalable_Graphics_Driver::draw(Fl_RGB_Image *,...) : change how the current scaling factor is taken into account.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12400 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-25 18:04:56 +00:00
Manolo Gouy
86e60e9068 X11 and WIN32: slightly change Fl_XXX_Graphics_Driver::cache(Fl_Pixmap*) to 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-25 17:42:46 +00:00
Manolo Gouy
9eeac9c737 X11+xft-pango: have Fl::set_fonts() show fonts with black, light, medium, demi bold, oblique styles.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12398 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-25 15:33:05 +00:00
Manolo Gouy
475d2504bd WIN32: have Fl_win32.cxx #include "config_lib.h"
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12397 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-25 15:02:25 +00:00
Manolo Gouy
c7405a22a8 X11 platform: cleaner implementation of changing the active drawing surface and maintaining clip regions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12396 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-24 12:40:29 +00:00
Manolo Gouy
c2d5cf4067 Simplify using Fl_XXX_Graphics_Driver::copy_offscreen() instead of 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-20 20:18:15 +00:00
Manolo Gouy
4331fdf46b Remove undesirable statement.
A bug was visible in test/unittests when moving between lines and rectangles.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12394 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-20 11:41:53 +00:00
Manolo Gouy
c51cbd0a50 Prevent situation where SetProcessDPIAwareness was called after Fl_WinAPI_Screen_Driver::init().
The effect was that the file_chooser test app did not recognize the window scaling factor.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12393 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-19 07:29:26 +00:00
Albrecht Schlosser
b4e434774f Remove unnecessary #include files from Fl_Help_View.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12392 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-18 15:46:20 +00:00
Albrecht Schlosser
3a5e2f074b Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-18 15:18:46 +00:00