| 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 "../../../include/fxcrt/fx_ext.h" | 7 #include "../../../include/fxcrt/fx_ext.h" |
| 8 #include "../../../include/fxge/fx_ge.h" | 8 #include "../../../include/fxge/fx_ge.h" |
| 9 #include "../agg/include/fxfx_agg_clip_liang_barsky.h" | 9 #include "../agg/include/fxfx_agg_clip_liang_barsky.h" |
| 10 #include "../ge/text_int.h" | 10 #include "../ge/text_int.h" |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 CGContextSetFontSize(_context, FXSYS_fabs(font_size)); | 846 CGContextSetFontSize(_context, FXSYS_fabs(font_size)); |
| 847 FX_INT32 a, r, g, b; | 847 FX_INT32 a, r, g, b; |
| 848 ArgbDecode(argb, a, r, g, b); | 848 ArgbDecode(argb, a, r, g, b); |
| 849 CGContextSetRGBFillColor(_context, | 849 CGContextSetRGBFillColor(_context, |
| 850 r / 255.f, | 850 r / 255.f, |
| 851 g / 255.f, | 851 g / 255.f, |
| 852 b / 255.f, | 852 b / 255.f, |
| 853 a / 255.f); | 853 a / 255.f); |
| 854 SaveState(); | 854 SaveState(); |
| 855 if (pGlyphMatrix) { | 855 if (pGlyphMatrix) { |
| 856 CGAffineTransform ctm = CGContextGetCTM(_context); | |
| 857 CGPoint origin = CGPointMake( glyph_positions[0].x, glyph_positions[0].
y); | 856 CGPoint origin = CGPointMake( glyph_positions[0].x, glyph_positions[0].
y); |
| 858 origin = CGPointApplyAffineTransform(origin, matrix_cg); | 857 origin = CGPointApplyAffineTransform(origin, matrix_cg); |
| 859 CGContextTranslateCTM(_context, origin.x, origin.y); | 858 CGContextTranslateCTM(_context, origin.x, origin.y); |
| 860 CGAffineTransform glyph_matrix = CGAffineTransformMake(pGlyphMatrix->a, | 859 CGAffineTransform glyph_matrix = CGAffineTransformMake(pGlyphMatrix->a, |
| 861 pGlyphMatrix->b, | 860 pGlyphMatrix->b, |
| 862 pGlyphMatrix->c, | 861 pGlyphMatrix->c, |
| 863 pGlyphMatrix->d, | 862 pGlyphMatrix->d, |
| 864 pGlyphMatrix->e, | 863 pGlyphMatrix->e, |
| 865 pGlyphMatrix->f); | 864 pGlyphMatrix->f); |
| 866 if (_foxitDevice2User.d < 0) { | 865 if (_foxitDevice2User.d < 0) { |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 return FALSE; | 1128 return FALSE; |
| 1130 } | 1129 } |
| 1131 if (!pBitmap->Create(width, height, format)) { | 1130 if (!pBitmap->Create(width, height, format)) { |
| 1132 delete pBitmap; | 1131 delete pBitmap; |
| 1133 return FALSE; | 1132 return FALSE; |
| 1134 } | 1133 } |
| 1135 m_bOwnedBitmap = TRUE; | 1134 m_bOwnedBitmap = TRUE; |
| 1136 return Attach(pBitmap); | 1135 return Attach(pBitmap); |
| 1137 } | 1136 } |
| 1138 #endif | 1137 #endif |
| OLD | NEW |