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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "core/fxcodec/include/fx_codec.h" | 9 #include "core/fxcodec/include/fx_codec.h" |
10 #include "core/fxge/ge/fx_text_int.h" | 10 #include "core/fxge/ge/fx_text_int.h" |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 int nrows = pGlyph->GetHeight(); | 406 int nrows = pGlyph->GetHeight(); |
407 if (anti_alias == FXFT_RENDER_MODE_NORMAL) { | 407 if (anti_alias == FXFT_RENDER_MODE_NORMAL) { |
408 if (!bitmap.CompositeMask(left, top, ncols, nrows, pGlyph, fill_color, 0, | 408 if (!bitmap.CompositeMask(left, top, ncols, nrows, pGlyph, fill_color, 0, |
409 0, FXDIB_BLEND_NORMAL, NULL, FALSE, alpha_flag, | 409 0, FXDIB_BLEND_NORMAL, NULL, FALSE, alpha_flag, |
410 pIccTransform)) { | 410 pIccTransform)) { |
411 FX_Free(pGlyphAndPos); | 411 FX_Free(pGlyphAndPos); |
412 return FALSE; | 412 return FALSE; |
413 } | 413 } |
414 continue; | 414 continue; |
415 } | 415 } |
416 FX_BOOL bBGRStripe = text_flags & FXTEXT_BGR_STRIPE; | 416 bool bBGRStripe = !!(text_flags & FXTEXT_BGR_STRIPE); |
417 ncols /= 3; | 417 ncols /= 3; |
418 int x_subpixel = (int)(glyph.m_fOriginX * 3) % 3; | 418 int x_subpixel = (int)(glyph.m_fOriginX * 3) % 3; |
419 uint8_t* src_buf = pGlyph->GetBuffer(); | 419 uint8_t* src_buf = pGlyph->GetBuffer(); |
420 int src_pitch = pGlyph->GetPitch(); | 420 int src_pitch = pGlyph->GetPitch(); |
421 int start_col = left; | 421 int start_col = left; |
422 if (start_col < 0) { | 422 if (start_col < 0) { |
423 start_col = 0; | 423 start_col = 0; |
424 } | 424 } |
425 int end_col = left + ncols; | 425 int end_col = left + ncols; |
426 if (end_col > dest_width) { | 426 if (end_col > dest_width) { |
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 void _CFX_UniqueKeyGen::Generate(int count, ...) { | 1907 void _CFX_UniqueKeyGen::Generate(int count, ...) { |
1908 va_list argList; | 1908 va_list argList; |
1909 va_start(argList, count); | 1909 va_start(argList, count); |
1910 for (int i = 0; i < count; i++) { | 1910 for (int i = 0; i < count; i++) { |
1911 int p = va_arg(argList, int); | 1911 int p = va_arg(argList, int); |
1912 ((uint32_t*)m_Key)[i] = p; | 1912 ((uint32_t*)m_Key)[i] = p; |
1913 } | 1913 } |
1914 va_end(argList); | 1914 va_end(argList); |
1915 m_KeyLen = count * sizeof(uint32_t); | 1915 m_KeyLen = count * sizeof(uint32_t); |
1916 } | 1916 } |
OLD | NEW |