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
780 x = i - (i & ~7);780 x = i - (i & ~7);
781 else781 else
782 x &= 7;782 x &= 7;
783 return (bg->image[i>>3] & (0x80>>x)) ? 0 : 255;783 return (bg->image[i>>3] & (0x80>>x)) ? 255 : 0;
784 }else if(bg->bitDepth == 4){784 }else if(bg->bitDepth == 4){
785 /* FIXME */785 /* FIXME */
786 assert(nil);786 assert(nil);
test.h+3−5
@@ -129,11 +129,9 @@ dumpmap(Otfile *f, GlyfImage **im, int n) · 128 unmodified lines
129 g = 0xff - g;129 g = 0xff - g;
130 b = 0xff - b;130 b = 0xff - b;
131 }131 }
132 if(r != 0xff || g != 0xff || b != 0xff){ 132 lt[t*3+0] = b;
133 lt[t*3+0] = b;133 lt[t*3+1] = g;
134 lt[t*3+1] = g;134 lt[t*3+2] = r;
135 lt[t*3+2] = r;
136 }
137 }135 }
138 }136 }
139 }137 }

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