mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-14 14:49:23 +03:00
allow tweaking threshold where alpha turns to mask
This commit is contained in:
parent
a0b344afe6
commit
eaa6183567
@ -495,7 +495,7 @@ static PLANEPTR ami_bitmap_get_mask(struct bitmap *bitmap, int width, int height
|
||||
|
||||
for(y=0; y<height; y++) {
|
||||
for(x=0; x<width; x++) {
|
||||
if ((*bmi & 0x000000ffU) == 0x00000000U) maskbit = 0;
|
||||
if ((*bmi & 0x000000ffU) <= (ULONG)nsoption_int(mask_alpha)) maskbit = 0;
|
||||
else maskbit = 1;
|
||||
bmi++;
|
||||
bitmap->native_mask[(y*(width/8)) + (x/8)] =
|
||||
|
@ -50,6 +50,7 @@
|
||||
bool faster_scroll; \
|
||||
bool scale_quality; \
|
||||
int dither_quality; \
|
||||
int mask_alpha; \
|
||||
bool ask_overwrite; \
|
||||
int printer_unit; \
|
||||
int print_scale; \
|
||||
@ -111,6 +112,7 @@
|
||||
.faster_scroll = true, \
|
||||
.scale_quality = false, \
|
||||
.dither_quality = 1, \
|
||||
.mask_alpha = 0, \
|
||||
.ask_overwrite = true, \
|
||||
.printer_unit = 0, \
|
||||
.print_scale = 100, \
|
||||
@ -171,6 +173,7 @@
|
||||
{ "faster_scroll", OPTION_BOOL, &nsoptions.faster_scroll}, \
|
||||
{ "scale_quality", OPTION_BOOL, &nsoptions.scale_quality}, \
|
||||
{ "dither_quality", OPTION_INTEGER, &nsoptions.dither_quality}, \
|
||||
{ "mask_alpha", OPTION_INTEGER, &nsoptions.mask_alpha}, \
|
||||
{ "ask_overwrite", OPTION_BOOL, &nsoptions.ask_overwrite}, \
|
||||
{ "printer_unit", OPTION_INTEGER, &nsoptions.printer_unit}, \
|
||||
{ "print_scale", OPTION_INTEGER, &nsoptions.print_scale}, \
|
||||
|
Loading…
Reference in New Issue
Block a user