2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

48 Commits

Author SHA1 Message Date
chrox
5ca6c8728c cleanup: change drawToCache method name to writeToCache
It will be more reasonable to fit in the read(reflow) - write(cache) -
draw(blit) system.
2012-11-14 10:11:09 +08:00
chrox
7faeece952 bugfix: save one reflow when switching between multi-threads on and off
The multi_threads variable should be excluded from the hash as cache
from the multi-threads procedure is valid for non-multi-threads
procedure and vice versa.
2012-11-14 10:03:44 +08:00
chrox
cd21b9f041 bugfix: sorry. I forgot to change the configurable defaluts. 2012-11-13 22:50:50 +08:00
chrox
262acbed09 bigfix: fix screen freeze when changing from threaded mode
to non-threaded mode.
2012-11-13 22:11:31 +08:00
chrox
49d4b5ff1e inform the user when turning page while bgthread has not finished yet 2012-11-13 21:45:10 +08:00
chrox
9594895b26 add options to disable multi-thread precache 2012-11-13 20:08:25 +08:00
chrox
5022609bc2 save one page reflow in occasional cases
when the page reflow is not finished from the bgthread but the main
thread ask to draw the page immediately. We will stay here to wait for
the bgthread.
2012-11-13 19:43:33 +08:00
chrox
1d018ee5bf add multi-threaded precache
Because the lua reader is single threaded on which both user inputloop
and background page rendering is processed. Although there is a pretty
good precache system to save user's time spending on waiting for the
rendering when going to the next page, user input is indeed blocked when
running the precache thing. The situation is even worse in koptreader as
reflowing on page would usually take several second, in this period
users cannot move to the next page view even it's already in the cache.
This patch will let precache run in the background in a seperate thread
so that the koptreader is still responsive when precaching the next
page. Now it only just works. Welcome to find out bugs in it.
2012-11-13 11:54:23 +08:00
chrox
6df1a05264 bugfix: reflowed page should be at the top of the screen
when reflowed page has a height less than screen height. This bug was
initially found by @tigran123 in #452. I'm sorry that I didn't fix it
until now.
2012-11-12 02:49:27 +08:00
chrox
f4eb9e7982 bugfix: update cur_bbox with correct page number when doing precache
Otherwise with the wrong pagehash the precache will be invalid and page
need to be reflowed twice.
2012-11-12 01:38:13 +08:00
chrox
ad19673bd7 add bbox modification inside of koptreader
The modification code is copied directly from unireader as I haven't
find a more elegant way yet.
2012-11-11 20:13:57 +08:00
Tigran Aivazian
6a53c2f864 Merge pull request #556 from chrox/koptreader-bbox
feature: add bbox support in koptreader
2012-11-10 07:00:17 -08:00
chrox
73f796a13c feature: add bbox support in koptreader
Reflow can be configured to use bbox which could remove
side comments and defects in the margin and get much better reflowed
page in some documents. Currently the bbox is only set in PDFReader or
DJVUReader reader. But eventually there will be bbox setting routines in
KOPTReader.
Thirdparty should be cleaned and refetched and remake to get
this feature in operation.
2012-11-09 11:04:01 +08:00
kai771
3293acd3a3 Implements page mode as a toggle 2012-11-09 00:58:40 +01:00
Tigran Aivazian
8c43d8226f Merge pull request #544 from chrox/koptcontext
update K2pdfopt to the latest version 1.60
2012-11-05 10:45:50 -08:00
chrox
65bd523d4c use koptcontext to keep dozons of parameters for k2pdfopt 2012-11-05 23:56:56 +08:00
kai771
57ce4b201f separates configurable options from the code 2012-11-04 14:19:21 +01:00
Tigran Aivazian
aeb6248424 Merge pull request #515 from kai771/rtl_mode
implements rtl_mode
2012-11-03 12:46:58 -07:00
chrox
3c197ccd78 add trim page option 2012-11-04 00:54:32 +08:00
chrox
655f2bb19b add defect size option 2012-11-03 17:32:57 +08:00
chrox
3bedc59287 add render quality option
Many users complained that the reflowing process is too slow. This is
rather a speed-quality dilemma. Trade-off can be made by decreasing the
dpi of source page. And by default quality is prefered.
2012-11-03 16:58:19 +08:00
kai771
c83b8b3c88 changes shortcut Alt-R to U 2012-11-01 18:23:38 +01:00
kai771
424e29e7e4 changes shortcut R to Alt-R 2012-11-01 17:34:33 +01:00
chrox
a8354db6ca add indentation option in koptconfig
By default the indentaion detection is enabled in K2pdfopt. This will
sometimes generate very poor reflowed page when there are sidenotes on
the page which would be treated as indentation. Disabling indentaion
detection will rescue the reflowed page from this situation.
2012-11-02 00:19:23 +08:00
kai771
a127ec2c47 implements rtl_mode 2012-10-31 21:45:23 +01:00
chrox
349d00c9b8 bugfix: avoid looping at the first page when keep pressing KEY_PGBCK 2012-10-28 17:56:29 +08:00
chrox
3c3fe9b0ef bugfix: save offset_y in doc settings
And keep offset_y at min_offset_y in next view at the last page
otherwise it will loop at the last page.
2012-10-28 17:49:07 +08:00
kai771
0d05db3a4b removes comics mode from koptreader, because it doesn't make sense there 2012-10-28 00:06:13 +02:00
kai771
a4322e44b9 fixes :setDefaults for other readers 2012-10-27 23:56:11 +02:00
chrox
47da06a29e add screen rotation in koptconfig 2012-10-27 22:38:53 +08:00
chrox
2f0cc5b827 when changing options in koptconfig dialog precache is disabled
Once koptconfig is finished the next page is cached immediately. This
will make the configuration process more responsive.
2012-10-27 21:43:33 +08:00
chrox
389177bd51 save koptconfig in doc settings and remove previously used zoom and
gamma variables
2012-10-27 21:25:12 +08:00
chrox
cc9a47daa8 add auto straighten option for scanned pages 2012-10-27 16:08:49 +08:00
chrox
7557dbe05e add column detection in koptconfig 2012-10-27 14:55:50 +08:00
chrox
138f9facf3 add font size option in koptconfig dialog 2012-10-27 14:24:27 +08:00
chrox
ce631f4827 merge justification and full justification to one option 2012-10-27 11:06:53 +08:00
chrox
83cc0ea24b add justification option in koptconfig dialog 2012-10-26 19:48:28 +08:00
chrox
f4a2b5f3a0 add page margin and text wrap and contrast option in koptconfig 2012-10-26 17:16:31 +08:00
chrox
b4417c73de add config dialog for koptreader
For now only line spaceing and word spaceing are configurable with
'F'/'Aa' commands. And device size are passed to k2pdfopt in place of
the hard-coded default width and height(via @dpavlin).
2012-10-26 00:37:50 +08:00
chrox
e05366f464 bugfix: dpi should be multiplied by shrink_factor not zoom 2012-10-24 23:53:22 +08:00
chrox
564f73d035 feedback zoom value used by page reflow
So that when zoom value exceed the upper limit of reflowable page size
user will notice that zoom value cannot be increased.
2012-10-24 22:01:36 +08:00
chrox
88fb136376 isolate doc settings of koptreader from pdfreader/djvureader 2012-10-24 20:39:20 +08:00
chrox
46b6000cb1 bugfix: refresh cache when switching between standard reader and
koptreader
2012-10-22 22:04:09 +08:00
chrox
e2a4a0d3b6 remove unused variable reflow_mode_enable in pagehash 2012-10-21 00:21:34 +08:00
chrox
a6f83fb856 Bugfix: guess and update offset_y after changing globalzoom 2012-10-20 04:36:33 +08:00
Tigran Aivazian
5cd3cec652 Delete "< >" command group in koptreader
This command group is identical to the one created in unireader.lua, so
there is no need for it.
2012-10-19 09:17:47 +01:00
chrox
f7e4a548c7 add DJVU reflow 2012-10-19 01:20:48 +08:00
chrox
afd97e0d43 Testing: index field 'commands' (a nil value) bug 2012-10-18 21:48:43 +08:00