Commit Graph

8006 Commits

Author SHA1 Message Date
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
Manolo Gouy
329f43eaf7 Documentation: describe the new GUI scaling feature of FLTK 1.4
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12731 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 17:29:25 +00:00
Matthias Melcher
1cf4371b69 Android: fixed some variables to avoid crashing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12730 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 16:22:44 +00:00
Matthias Melcher
5591ba811a Android: adding and fixing to the graphics clipping code
Android has no classic window manager, so FLTK has to
make sure that popup windows, dialog boxes and multi
window interfaces work as expectd.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 13:17:41 +00:00
Manolo Gouy
2adaadbd94 Remove useless #include statement.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12728 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 06:55:57 +00:00
Manolo Gouy
fd1696d18e Fl_Xlib_Graphics_Driver::scale_clip: restrict the computed X11 region to the 16-bit coordinate space.
This member function transforms the current clip region from FLTK units to pixel units
multiplying FLTK units by the current value of the scale factor to get pixel units.
The current clip region has been, by construction, restricted to the 16-bit coordinate space.
But these data can evade this space after multiplication by the scale factor.
Thus, it's necessary to enforce the 16-bit space here which is done with Fl_Xlib_Graphics_Driver::XRectangleRegion.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12727 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 06:46:13 +00:00
Matthias Melcher
c0cbf0fbde Android: crude graphics clipping
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12726 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-10 00:46:12 +00:00
Albrecht Schlosser
dc2fb581b7 Improve X11 (16-bit) clipping of lines and rectangles.
In FLTK 1.3.x only horizontal and vertical long lines with endpoints
outside the 16-bit coordinate space could be drawn with proper X11
coordinate clipping. Now arbitrary lines are clipped so they can be
drawn with X11 functions.

All rectangles are clipped as well (as in 1.3).

Todo: The code needs better documentation and clipping of polygons,
circles, curves etc. is still missing. The next step should be the
clipping of polygons...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12725 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-09 22:30:07 +00:00