History

bitpixel: not supposed to be inverted for 1-bit formats

Sigrid Solveig Haflínudóttir committed 2 years ago

Commit b8dd2861 parent a56da652 files · +4 −6Browse files

Unified · Split

2 files
  1. rast.c +1 −1
  2. test.h +3 −5
rast.c+1−1
@@ -780,7 +780,7 @@ bitpixel(BitmapGlyph *bg, int x, int y) · 779 unmodified lines
780780 x = i - (i & ~7);
781781 else
782782 x &= 7;
783− return (bg->image[i>>3] & (0x80>>x)) ? 0 : 255;
783+ return (bg->image[i>>3] & (0x80>>x)) ? 255 : 0;
784784 }else if(bg->bitDepth == 4){
785785 /* FIXME */
786786 assert(nil);
test.h+3−5
@@ -129,11 +129,9 @@ dumpmap(Otfile *f, GlyfImage **im, int n) · 128 unmodified lines
129129 g = 0xff - g;
130130 b = 0xff - b;
131131 }
132− if(r != 0xff || g != 0xff || b != 0xff){
133− lt[t*3+0] = b;
134− lt[t*3+1] = g;
135− lt[t*3+2] = r;
136− }
132+ lt[t*3+0] = b;
133+ lt[t*3+1] = g;
134+ lt[t*3+2] = r;
137135 }
138136 }
139137 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t