forked from koreader/koreader-base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reimplement/fix dimRect() and lightenRect()
dimRect() and lightenRect() did assume that 0=white, 15=black (old 4bpp inverted colors), thus did work the other way around. Fix this. Drop the pixel dim/lighten methods, rather use a blend with WHITE and (by default 50%) alpha. The lightenRect() method changed in its inner workings by this patch. Before, it applied a minimum value, leaving bigger values untouched. Now, it is blending, i.e. making an alpha blend with black (yes, black, not white, see below). That reduces code footprint, and may look slightly better, too. TODO: rename this methods. They do exactly the opposite as what their names suggest.
- Loading branch information
Showing
1 changed file
with
14 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters