Commit Graph

8113 Commits

Author SHA1 Message Date
Greg Ercolano
3a20682764 Fixed title bar
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-21 14:57:15 +00:00
Manolo Gouy
d90a286bcd X11: Remove tentative, uncompiled code to cache RGB images with Xrender Picture instead of Pixmap
The speed benefit is not obvious.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12781 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-21 06:36:58 +00:00
Manolo Gouy
aaf5c60aaa Extend the doc of Fl_Image::scale() member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12780 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-20 17:23:08 +00:00
Albrecht Schlosser
f3b0598ee4 Fix, optimize, and comment "gleam" scheme box drawing.
Some border lines were too short or too long, the shading code would draw
too many shaded lines, and the code was hard to understand.

With this commit all background pixels of the box are drawn exactly once.
The border lines are consistent, but some pixels of the border are not
drawn at all so the background shines through. This is intended for
backwards compatibility.

A minor change is that the drawn background does no longer overlap the
border lines. Hence undrawn pixels that previously displayed the colored
box background are now transparent and show the parent's background color.

This commit adds comments and implementation notes to make the code
easier to understand and better maintainable (hopefully).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-20 16:30:58 +00:00
Manolo Gouy
3b4c3e3295 Remove compilation warning with gcc-6.3 and -Wreorder
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-20 12:57:51 +00:00
Manolo Gouy
916b44e361 New member function Fl_Image::scale(int width, int height) to set the FLTK 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-19 17:43:18 +00:00
Manolo Gouy
c4f7c09b7b Remove useless member function declaration.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12775 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-19 06:45:18 +00:00
Matthias Melcher
c3573d16f3 Android: Implemented font changing ( Fl::set_font(ix, name); )
and other font stuff. Fixed horizontal and vertical line
         drawing to include last pixel. Added stippling to focus rect.
         Added point drawing (slooow).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12774 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-18 20:04:43 +00:00
Albrecht Schlosser
6dbe7ca8ed Fix a doxygen warning, update copyright.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12773 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-18 15:25:08 +00:00
Matthias Melcher
d252801a31 Android: Fixed another bug when deleting complex clipping areas
Better complex region cleanup - should be compete now...

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12772 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-18 14:58:25 +00:00
Matthias Melcher
5900d824e9 Android: Fixed bug when deleting complex clipping areas
Tested FLTK schemes - nice!
         Fixed crashbug in timer
         Fixed crashbug in mouse handler

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12771 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-18 13:44:37 +00:00
Matthias Melcher
7ff40388cb Android: intersetcing a complex clipping region with a rectangle
However I did disable the complex region optimizer - too tired to get
the pointers right... .

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12770 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-17 21:54:09 +00:00
Matthias Melcher
0c8ae29b79 Android: added text clipping in all its uglyness.
Next: intersetcing a complex clipping region with a rectangle

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12769 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-17 21:30:46 +00:00
Matthias Melcher
6bf8fe983d Android: added fontattributes, so formatting works well now.
Next: add clipping

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12768 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-17 20:33:51 +00:00
Matthias Melcher
e599a0194d Android: added font access into Android package via Assets, added font
fallbacks, added emergency font as an asset, added graceful
         behavior when absolutely no font could be loaded.

Next: add other font related calls, add clipping

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12767 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-17 19:32:05 +00:00
Matthias Melcher
07f18616cb Android: added chaching
Next: add other font related calls, add clipping, 
      add font paths for package resources

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12766 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-17 17:41:16 +00:00
Matthias Melcher
0016617ad4 Android: yes, we can unicode; cleanup; documentd
Next: add caching, add other font related calls, add clipping, 
      add font paths for package resources

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-17 16:23:40 +00:00
Matthias Melcher
69e534b48f Android: basic font management structure is complete.
Next: cleanup, document, add caching, add other font related calls, 
      add clipping, add font paths for package resources

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12764 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-17 13:15:39 +00:00
Matthias Melcher
1084602fec Android: loading and rendering multiple fonts at multiple sizes.
This code is still a total mess and incredibly inefficient.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12763 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-16 21:49:58 +00:00
Matthias Melcher
9bf59b88bd Android: finally founded font functionality, freakishly fluttered first
files, further fostering follows.
          
Or, to put it bluntly, I forgot how the font system works, and now I am 
digging through the implementations of other drivers, carrying bits and
pieces together. But you know that I will clean my files eventually... .

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12762 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-16 20:27:12 +00:00
Matthias Melcher
6c234ad12e Android: starting to handle user clipping regions, but first I will
render better text, so I have something to test this on.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12761 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-16 17:53:09 +00:00
Matthias Melcher
b6858cef56 Android: added function to optimize complex regions
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12760 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-16 17:39:16 +00:00
Albrecht Schlosser
e0a15603dd CMake/fltk-config: update fltk-config (LDFLAGS) for MacOS.
This is a preliminary patch to enable linking with pango on MacOS
when fltk-config is used. A better solution is under development.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-16 14:12:05 +00:00
Matthias Melcher
bdb63b3f07 Android: clipping regions code grew so big, they moved into their own
header and source file.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12758 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-16 12:48:29 +00:00
Albrecht Schlosser
0e4b7bbb49 Fix whitespace and comments only.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12757 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-16 12:48:27 +00:00
Matthias Melcher
803747d580 Android: commented the iterator code of the complex clipping area.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12756 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 22:23:17 +00:00
Matthias Melcher
ce5371cbf0 Android: clipping code cleanup, xy and yx lines are clipped
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12755 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 21:50:27 +00:00
Matthias Melcher
6a145ed63a Android: window clipping working fl_rectf.
This code is not very beautiful, but the resulting class should be
easy to use. A range-based loop can be used to find all relevant
clipping rectangles for a drawing call.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12754 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 21:17:16 +00:00
Albrecht Schlosser
726cb77717 Improve X11 coordinate clipping.
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-15 16:52:27 +00:00
Albrecht Schlosser
7d985f842a Fix a potential internal stack overflow in Xlib graphics driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12752 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 16:34:09 +00:00
Albrecht Schlosser
6e4ed88f40 Remove unused #include files and FL_CFG_* conditional code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12751 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 15:34:37 +00:00
Matthias Melcher
30d1a1687f Fixing Tabs, typos, and comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12750 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 10:08:53 +00:00
Matthias Melcher
f36963610f Fixing FIXME's and tab characters in fl_shortcut.cxx.
Yes, I am bored otherwise.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12749 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 09:49:07 +00:00
Matthias Melcher
67f0018dca Removed warning for Android. Fixed "FIXME" in Fl_Tooltip. Removed tab characters.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12748 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 09:34:20 +00:00
Matthias Melcher
630fc8e983 Android: implemented good complex clipping, but unoptimized.
fl_rectf is so far the only function that uses the complex clipping
region successfully. Code is slow, but works.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12747 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15 00:07:53 +00:00
Matthias Melcher
1bb5eea696 Android: implemented complex clipping at the first level.
Clipping areas are calculated for overlapping windows, named "Desktop
Windows". The first level implementation works if the resulting complex
region is just a rectangle. Higher complexity (sub-rectangles) is next.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12746 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-14 23:13:48 +00:00
Matthias Melcher
737d8bef24 Android: adding stress test for complex clipping.
Complex clipping is needed to allow popup dialogs and menu window while 
still correctly rendering windows that are "below" those popups.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12745 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-14 21:46:01 +00:00
Albrecht Schlosser
c023f26fb0 Improve and simplify X line and rect 16-bit clipping.
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-13 22:11:17 +00:00
Matthias Melcher
ac04494e91 Android: fixed Fl_Rect.H commit.
Cleaned up some driver code.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12743 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-12 20:54:27 +00:00
Matthias Melcher
b0a514366e Android: added support for Fl::add_timeout() and friends.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12742 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-12 20:10:49 +00:00
Matthias Melcher
1b52ead802 Android: Reinstated working simple cliping functionality based on an
improved Fl_Rect_Region class instead of Fl_Rect. Commented out 
 complex clipping.
 
 Android lib and apps now use C++11 because they can (and I like it).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12741 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-12 12:57:28 +00:00
Manolo Gouy
371cfd1476 Make Fl_Graphics_Driver constructor protected, as it was in FLTK 1.3.x
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12740 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-12 09:42:45 +00:00
Matthias Melcher
88ce4aec17 Android: Made Fl_Rect virtual. Maybe a bad idea?
Also, added rectangular clipping which works.
Expanding now to a more complex clipping scheme to make multiple
windows work.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12739 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11 22:00:59 +00:00
Albrecht Schlosser
0b1fd7ee37 Document fl_numericsort() and fl_casenumericsort().
Note: These two functions are not yet UTF-8 aware. Results may be unexpected.

Possible test case: run test/file_chooser or any FLTK program with
Fl_File_Chooser. The default display order is determined by fl_numericsort():

  Fl_File_Chooser::sort = fl_numericsort;


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12738 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11 16:24:36 +00:00
Manolo Gouy
d8d04bf772 Documentation: homogenize to 'scale factor' and 'drawing unit'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12737 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11 14:49:09 +00:00
Manolo Gouy
e82e430c3b Documentation of fl_create_offscreen: give more details useful because the screen scale factor can now vary.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12736 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11 08:33:36 +00:00
Manolo Gouy
a45afd2b99 Documentation: homogenize the use of "screen" rather than "display" and "FLTK units".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12735 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11 08:09:50 +00:00
Manolo Gouy
7ab977ac86 Documentation: homogenize uses of "FLTK units" and "drawing units".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12734 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11 07:17:20 +00:00
Manolo Gouy
67fc24f3d2 Remove mention of -DFLTK_HIDPI_SUPPORT which was removed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12733 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 17:38:51 +00:00
Matthias Melcher
70e629b05d Android: finally taught AndroidStudio where the SVN root directory is
located. No more SVN from the command line.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12732 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 17:35:00 +00:00