OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/fxge/ge/fx_text_int.h" | 7 #include "core/fxge/ge/fx_text_int.h" |
8 #include "core/include/fxcodec/fx_codec.h" | 8 #include "core/include/fxcodec/fx_codec.h" |
9 #include "core/include/fxge/fx_freetype.h" | 9 #include "core/include/fxge/fx_freetype.h" |
10 #include "core/include/fxge/fx_ge.h" | 10 #include "core/include/fxge/fx_ge.h" |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 } else { | 368 } else { |
369 bitmap.Clear(0); | 369 bitmap.Clear(0); |
370 if (bitmap.m_pAlphaMask) { | 370 if (bitmap.m_pAlphaMask) { |
371 bitmap.m_pAlphaMask->Clear(0); | 371 bitmap.m_pAlphaMask->Clear(0); |
372 } | 372 } |
373 } | 373 } |
374 int dest_width = pixel_width; | 374 int dest_width = pixel_width; |
375 uint8_t* dest_buf = bitmap.GetBuffer(); | 375 uint8_t* dest_buf = bitmap.GetBuffer(); |
376 int dest_pitch = bitmap.GetPitch(); | 376 int dest_pitch = bitmap.GetPitch(); |
377 int Bpp = bitmap.GetBPP() / 8; | 377 int Bpp = bitmap.GetBPP() / 8; |
378 int a, r, g, b; | 378 int a = 0; |
| 379 int r = 0; |
| 380 int g = 0; |
| 381 int b = 0; |
379 if (anti_alias == FXFT_RENDER_MODE_LCD) { | 382 if (anti_alias == FXFT_RENDER_MODE_LCD) { |
380 _Color2Argb(fill_color, fill_color, alpha_flag | (1 << 24), pIccTransform); | 383 _Color2Argb(fill_color, fill_color, alpha_flag | (1 << 24), pIccTransform); |
381 ArgbDecode(fill_color, a, r, g, b); | 384 ArgbDecode(fill_color, a, r, g, b); |
382 r = FX_GAMMA(r); | 385 r = FX_GAMMA(r); |
383 g = FX_GAMMA(g); | 386 g = FX_GAMMA(g); |
384 b = FX_GAMMA(b); | 387 b = FX_GAMMA(b); |
385 } | 388 } |
386 for (iChar = 0; iChar < nChars; iChar++) { | 389 for (iChar = 0; iChar < nChars; iChar++) { |
387 FXTEXT_GLYPHPOS& glyph = pGlyphAndPos[iChar]; | 390 FXTEXT_GLYPHPOS& glyph = pGlyphAndPos[iChar]; |
388 if (!glyph.m_pGlyph) { | 391 if (!glyph.m_pGlyph) { |
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1863 void _CFX_UniqueKeyGen::Generate(int count, ...) { | 1866 void _CFX_UniqueKeyGen::Generate(int count, ...) { |
1864 va_list argList; | 1867 va_list argList; |
1865 va_start(argList, count); | 1868 va_start(argList, count); |
1866 for (int i = 0; i < count; i++) { | 1869 for (int i = 0; i < count; i++) { |
1867 int p = va_arg(argList, int); | 1870 int p = va_arg(argList, int); |
1868 ((FX_DWORD*)m_Key)[i] = p; | 1871 ((FX_DWORD*)m_Key)[i] = p; |
1869 } | 1872 } |
1870 va_end(argList); | 1873 va_end(argList); |
1871 m_KeyLen = count * sizeof(FX_DWORD); | 1874 m_KeyLen = count * sizeof(FX_DWORD); |
1872 } | 1875 } |
OLD | NEW |