Commit Graph

9244 Commits

Author SHA1 Message Date
ComputerNerd
34da17cd85 Set errmsg to exterr instead of err which will always be zero. 2020-12-13 21:15:47 -06:00
ManoloFLTK
4f29313a80 Windows scaling: fix redraw after partial expose events.
Under XP (at least), WM_PAINT events occur where information of where to redraw
is mostly given by the system, in the window's update region. When the GUI is scaled,
that information must be un-scaled and then added to Fl_X::i(window)->region, for the
adequate part of the window to be painted.
2020-12-03 15:08:59 +01:00
ManoloFLTK
f787a1b4e4 Remove build-time warning.
The warning message was:
Makefile:318: warning: ignoring prerequisites on suffix rule definition
2020-12-02 21:12:15 +01:00
ManoloFLTK
d1c7caec3b Improve Fl_Graphics_Driver::cache_size() when GUI is scaled.
The change lets this function enlarge the size only when strictly necessary
for image tiling.
2020-12-02 14:39:49 +01:00
ManoloFLTK
4171cbe0be Windows scaling: fix computation of border sizes.
The corrected error was to use, e.g.,
  int dx = W - w->w() * s;
which does not produce the desired integer value.
The correct writing is :
  int dx = W - int(w->w() * s);
2020-12-01 16:58:08 +01:00
Albrecht Schlosser
4531c6c48f Travis-CI: simplify config, disable macOS build (temp.)
Note: macOS builds will be re-enabled when the Travis-CI
  "Credits" issue is resolved.
2020-12-01 02:03:32 +01:00
Albrecht Schlosser
da5dc6eebf Travis-CI: disable macOS and documentation builds
Temporarily disable unnecessary builds for trouble shooting with
  Travis-CI support (no Credits)
2020-12-01 01:23:12 +01:00
ManoloFLTK
67bb631bd9 Scaling for Windows and X11: support rectangular loops. 2020-11-30 18:50:19 +01:00
ManoloFLTK
ff372c86d8 Fix for issue #123 - Windows platform 2020-11-29 09:48:23 +01:00
ManoloFLTK
f5f9043208 Windows: fix undrawn pixels at right and bottom of scaled windows. 2020-11-29 09:15:04 +01:00
ManoloFLTK
4291e9497b Fix for issue #123 - macOS platform 2020-11-27 17:49:49 +01:00
ManoloFLTK
d851106f47 Prevent compilation warning about uninitialized variables. 2020-11-27 09:17:33 +01:00
ManoloFLTK
d7985607d6 Fix for issue #123 - X11 platform
As discussed, only the window position becomes rounded to nearest integer value
when a fractional GUI scale factor is applied.
2020-11-25 09:21:44 +01:00
ManoloFLTK
c70a091fa3 Match format specifier and variable type. 2020-11-25 08:29:47 +01:00
Albrecht Schlosser
df4ae812b4 Travis-CI: update Linux + macOS build environments
Linux: trusty -> xenial (current @ travis-ci.com)

macOS: (default) -> xcode12.2 (latest as of today)
2020-11-25 00:18:10 +01:00
Albrecht Schlosser
5a04ca6c38 Improve resizing of test/cube demo (#157, #166)
Based on Greg's mods in 'cube-v5a-patch.txt' in this issue #157 comment:
  https://github.com/fltk/fltk/issues/157#issuecomment-732496554

Simplify the layout and keep border widths constant:

- combine left GL window + buttons (ct_group) in left group (lt_grp)
- make the cube Fl_Gl_Windows the resizable()s of their respective groups.

The latter keeps the margin widths constant.
2020-11-24 21:37:59 +01:00
ManoloFLTK
bb099ade19 Basic CMakeLists.txt file to build FLTK-based user program - continued
A single add_executable() command is possible.
2020-11-24 10:05:36 +01:00
ManoloFLTK
c684505407 Fix for issue #163: Improve Xrender scaling quality 2020-11-24 10:05:36 +01:00
ManoloFLTK
c7274294ae Basic CMakeLists.txt file to build FLTK-based user program.
The change is mostly concerned with showing how to build
a macOS bundled app, in addition to X11 and Windows support.
2020-11-23 17:22:58 +01:00
ManoloFLTK
018134161d Documentation: clarify how keypad keys are named. 2020-11-23 11:44:42 +01:00
Greg Ercolano
a41d8c0e60 Fix issue #162 2020-11-22 18:18:02 -08:00
ManoloFLTK
a47c907fca Fix for STR #3424 and for issue #160 2020-11-22 10:16:21 +01:00
Albrecht Schlosser
7d4f427a93 Fix Fl_Scrollbar layout in test/valuators demo 2020-11-21 13:21:11 +01:00
Albrecht Schlosser
f519aceb85 Update dependencies 2020-11-21 13:20:26 +01:00
ManoloFLTK
aa9e2e888e Fix for issue #159 - continued
Changes here concentrate the fix within static function alpha_blend() and thus
are visible only when drawing transparent images under X11 platform
without Xrender.
2020-11-20 10:33:46 +01:00
ManoloFLTK
aa140973a3 Remove compilation warnings about signed/unsigned comparison. 2020-11-19 16:13:02 +01:00
ManoloFLTK
e52e057cdf Fix for issue #159. 2020-11-19 15:59:48 +01:00
ManoloFLTK
3ec51f0b80 Remove unnecessary function call when macOS ≥ 10.6 2020-11-19 15:59:48 +01:00
ManoloFLTK
f56d43c9f6 Rename private member function with trailing underscore. 2020-11-19 15:59:48 +01:00
ManoloFLTK
0f6fb2ab5a Add comment about detection of macOS "Big Sur" 11.0 at run-time. 2020-11-19 15:59:48 +01:00
Albrecht Schlosser
5cb72ef065 Fix whitespace and minor formatting issues 2020-11-17 16:11:03 +01:00
ManoloFLTK
2931c29689 Replace virtual Fl_RGB_Image::cache_size() by virtual Fl_Image::cache_size() 2020-11-17 11:23:35 +01:00
Albrecht Schlosser
1a1ce33751 Update README.txt
Fix issues with old links, svn to git conversion, bundled IDE files,
etc.
2020-11-15 16:12:12 +01:00
ManoloFLTK
18ae6c84eb Remove unnecessary friend declaration in class Fl_SVG_Image 2020-11-14 10:06:51 +01:00
ManoloFLTK
c227edef39 Fix for issue #155 - continued
This fix takes care of the Windows platform.
2020-11-13 10:02:43 +01:00
ManoloFLTK
a4bacf83c4 Fix for issue #155 - continued
Restores proper separation of what is in libfltk and what is in libfltk_images
2020-11-12 14:50:57 +01:00
ManoloFLTK
231159e16c Fix for issue #155 - continued
The issue lies in details how floating point scaled coordinates are converted
to integer values and its impact on the drawing of large SVG images.
This commit fixes the X11 platform.
The macOS platform is immune because drawing uses floating point
coordinates.
The Windows platform still needs fixing.
2020-11-12 07:46:12 +01:00
ManoloFLTK
df9749e6a8 Fix for issue #155 "SVG rendering spoiled by scaling". 2020-11-10 21:03:48 +01:00
ManoloFLTK
7b6d0a8196 Restore building with --disable-svg 2020-11-10 15:51:54 +01:00
ManoloFLTK
08b36fe4c8 Remove useless typedef declaration. 2020-11-10 15:51:54 +01:00
ManoloFLTK
9bd65d5993 Remove compilation warning that HAVE_DLFCN_H is undefined. 2020-11-10 15:51:54 +01:00
Albrecht Schlosser
a03ab3b498 Clarify offscreen drawing documentation
... and rename drawing chapters (sections + subsections) according
to our documentation conventions (prefix "drawing_").

documentation/make_pdf: fix copyright year.
2020-11-08 15:43:34 +01:00
ManoloFLTK
b35010595a Simpler code and doc of Fl::screen_scale(int n, float factor) 2020-11-07 12:44:06 +01: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
5132bb6a06 Clarify doc about how FLTK_SCALING_FACTOR operates. 2020-11-03 08:13:45 +01:00
ManoloFLTK
98a4e49204 Fix possible memory leak in Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled()
Thanks to "fire-eggs" for spotting it.
Also minor optimisations in Fl_X11_Screen_Driver::read_win_rectangle_unscaled() and
Fl_Cocoa_Screen_Driver::read_win_rectangle_unscaled().

This closes PR #151.
2020-11-02 13:13:53 +01:00
engelsman
f0af606708
Save fl_file_chooser directory on cancel (STR 3225) (#110)
* save fl_file_chooser directory on cancel (STR3225)

by default, the fl_file_chooser() starts in the current directory
if no filename is given, but the directory is reset to the "system
directory" if the dialog is cancelled without choosing a file.
This patch saves and restores the directory if no file is chosen.

See also https://www.fltk.org/str.php?L3225

* add fl_file_chooser() reinitialization comments
2020-11-02 11:38:30 +01:00
Greg Ercolano
7d126461ef Update cmake version requirement in README 2020-11-01 13:03:33 -08:00
erco77
2b1a2fe8dd
Merge pull request #150 from erco77/master
Rewrite fluid CodeEditor syntax highlighting for issue #135
2020-11-01 12:48:52 -08:00
Greg Ercolano
dab049a2bd Merge branch 'issue135-1.4.x' 2020-11-01 12:16:59 -08:00