Commit Graph

7992 Commits

Author SHA1 Message Date
Manolo Gouy
458d063643 Image classes: memorise the width and the height of the cached form of the image to support GUI scaling
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-28 13:00:12 +00:00
Matthias Melcher
29bda776bb Android: Implemented Pixmap drawing, also much cleanup in Fl_Android_Graphics_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12810 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-27 21:54:04 +00:00
Matthias Melcher
e52b55c09d Android: Fl_Android_Graphics_Driver now derives from Fl_Graphics_Driver and no longer from the dpi-aware scaling version. I may add this level of complexity later, but for now, unscaled drivers are difficult enough. Also, the new setup lets me easily find unimplemented methods of the driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-27 15:31:26 +00:00
Matthias Melcher
daca2a95cf Android: New version of the IDE Android Studio 3.1 . All still working fine.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 21:39:02 +00:00
Matthias Melcher
3b7e1a5ec6 Android: Draws Fl_Bitmap.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 21:28:18 +00:00
Manolo Gouy
5040bbff1f Fix for STR#3457: Fl_SVG_Image handling of invalid width/height
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 16:17:00 +00:00
Matthias Melcher
4df5c6d0b0 Android: Avoids hiding and showing keyboard when focus changes from text input to text input
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12805 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 15:42:08 +00:00
Matthias Melcher
e8818e968c Android: Widgets can now request the on-screen keyboard when they get focus. This may fail if visible_focus is disabled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12804 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 15:33:22 +00:00
Matthias Melcher
20ed92fca4 Android: Keyboard handles modifiers like Shift and Alt... .
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12803 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 14:48:13 +00:00
Manolo Gouy
77cc7b147a Documentation: give more detail for Fl_Image::w(int W) and Fl_Image::h(int H)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12802 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 08:20:17 +00:00
Matthias Melcher
ca8f680000 Android: Added keycodes to make arrow keys, delete, return, and other non text-keys work. ALso added a Java helper class to make Java call easier. We may need more Java/JNI in the future.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12801 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-25 22:27:21 +00:00
Matthias Melcher
eb09ab161a Android: Separating keyboard stuff into a new file
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12800 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-25 16:48:44 +00:00
Matthias Melcher
832377fc21 Android: Improved event handling to handle all pending events before redrawing the interface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12799 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-25 16:34:40 +00:00
Manolo Gouy
0e765c6cd8 Documentation: explain how images are best handled in the context of GUI rescaling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12798 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-25 06:15:50 +00:00
Matthias Melcher
d7520d5a71 Android: Tried to fix flaws in the Android Native interface. Only
solution I found involves Java, so, no.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12797 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24 21:36:55 +00:00
Manolo Gouy
d1fd225767 Remove GUI scale factor values above 300% which were here for development only.
300% is also the max scaling value Firefox allows.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12796 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24 18:14:05 +00:00
Matthias Melcher
5f8cec6383 Android: Even rougherer cut to make the keyboard pop up.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12795 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24 17:21:36 +00:00
Matthias Melcher
fada3a8291 Android: Rough, verz rough kezboard handling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12794 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24 17:08:25 +00:00
Matthias Melcher
79b31708de Android: Made popup and menu windows work, fixed Fl::wait() recursion,
fixed incompatible Fl::wait() behavior.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12793 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24 13:06:59 +00:00
Manolo Gouy
db55dfbbd6 Windows: avoid changing the current Fl_Surface_Device when drawing an Fl_Double_Window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24 08:08:32 +00:00
Matthias Melcher
a3a5a3d924 Android: Using floating point calls to make thigs look slightly better.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12791 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-23 23:11:35 +00:00
Matthias Melcher
5843a450bc Android: Using xlib shortcut to draw circles and ellipses.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12790 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-23 23:09:24 +00:00
Matthias Melcher
d695ccb2d2 Android: Further testing. Need circle drawing rountines.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12789 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-23 23:01:13 +00:00
Matthias Melcher
aeafea2041 Android: Added fl_polygon and fl_loop calls. All boxtypes draw well now.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12788 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-23 22:50:26 +00:00
Matthias Melcher
514782864e Android: Posting well behaved pie drawing method. Needs refactoring.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12787 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-23 21:41:36 +00:00
Manolo Gouy
b8a50851fd Fix Fl_Image::copy() and its versions for derived image classes following the introduction of Fl_Image::scale()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-23 17:03:24 +00:00
Matthias Melcher
bd5ec33148 Android: Posting pretty buggy pie method; must visit later!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12785 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-22 21:36:09 +00:00
Manolo Gouy
9f9631e685 Rename Fl_Image::pixel_w() and pixel_h() to Fl_Image::data_w() and data_h().
The docs of class Fl_Image and of Fl_Image::scale() are beefed up.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12784 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-22 16:38:38 +00:00
Matthias Melcher
0b8116ff72 Android: Implemented vector drawing and polygons.
Started to implement arc and pie drawing

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12783 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-22 15:27:02 +00:00
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