Skip to content

Commit

Permalink
bug: mac didnt build with existing FT_Color def. shoulve checked
Browse files Browse the repository at this point in the history
  • Loading branch information
galkahana committed Oct 2, 2023
1 parent b0057d4 commit f33f094
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions PDFWriter/PaintedGlyphsDrawingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,17 +452,14 @@ bool PaintedGlyphsDrawingContext::ExecutePaintColrGlyph(FT_PaintColrGlyph inColr
return false;
}

Byte r = (Byte)((mOptions.colorValue >> 16) & 0xFF);
Byte g = (Byte)((mOptions.colorValue >> 8) & 0xFF);
Byte b = (Byte)(mOptions.colorValue & 0xFF);
Byte a = (Byte)(mOptions.opacity*255);

color = {
b,
g,
r,
a
FT_Color computedColor = {
(Byte)(mOptions.colorValue & 0xFF), // b
(Byte)((mOptions.colorValue >> 8) & 0xFF), // g
(Byte)((mOptions.colorValue >> 16) & 0xFF), // r
(Byte)(mOptions.opacity*255) // a
};

color = computedColor;
} else {
if(colorStop.color.palette_index >= mPaletteSize) {
TRACE_LOG2("LayeredGlyphsDrawingContext::Draw, requsted color index %d is too high. The color palette only holds index 0 to %d", colorStop.color.palette_index, mPaletteSize);
Expand Down

0 comments on commit f33f094

Please sign in to comment.