| 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/fpdfapi/fpdf_render/render_int.h" | 7 #include "core/fpdfapi/fpdf_render/render_int.h" |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return TRUE; | 111 return TRUE; |
| 112 } | 112 } |
| 113 if (bClip || bStroke) { | 113 if (bClip || bStroke) { |
| 114 const CFX_Matrix* pDeviceMatrix = pObj2Device; | 114 const CFX_Matrix* pDeviceMatrix = pObj2Device; |
| 115 CFX_Matrix device_matrix; | 115 CFX_Matrix device_matrix; |
| 116 if (bStroke) { | 116 if (bStroke) { |
| 117 const FX_FLOAT* pCTM = textobj->m_TextState.GetCTM(); | 117 const FX_FLOAT* pCTM = textobj->m_TextState.GetCTM(); |
| 118 if (pCTM[0] != 1.0f || pCTM[3] != 1.0f) { | 118 if (pCTM[0] != 1.0f || pCTM[3] != 1.0f) { |
| 119 CFX_Matrix ctm(pCTM[0], pCTM[1], pCTM[2], pCTM[3], 0, 0); | 119 CFX_Matrix ctm(pCTM[0], pCTM[1], pCTM[2], pCTM[3], 0, 0); |
| 120 text_matrix.ConcatInverse(ctm); | 120 text_matrix.ConcatInverse(ctm); |
| 121 device_matrix.Copy(ctm); | 121 device_matrix = ctm; |
| 122 device_matrix.Concat(*pObj2Device); | 122 device_matrix.Concat(*pObj2Device); |
| 123 pDeviceMatrix = &device_matrix; | 123 pDeviceMatrix = &device_matrix; |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 int flag = 0; | 126 int flag = 0; |
| 127 if (bStroke && bFill) { | 127 if (bStroke && bFill) { |
| 128 flag |= FX_FILL_STROKE; | 128 flag |= FX_FILL_STROKE; |
| 129 flag |= FX_STROKE_TEXT_MODE; | 129 flag |= FX_STROKE_TEXT_MODE; |
| 130 } | 130 } |
| 131 if (textobj->m_GeneralState.GetStrokeAdjust()) | 131 if (textobj->m_GeneralState.GetStrokeAdjust()) |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, | 666 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, |
| 667 charpos.m_OriginY); | 667 charpos.m_OriginY); |
| 668 path.m_Path.Append(pPath, &matrix); | 668 path.m_Path.Append(pPath, &matrix); |
| 669 path.m_Matrix = *pTextMatrix; | 669 path.m_Matrix = *pTextMatrix; |
| 670 path.m_bStroke = bStroke; | 670 path.m_bStroke = bStroke; |
| 671 path.m_FillType = bFill ? FXFILL_WINDING : 0; | 671 path.m_FillType = bFill ? FXFILL_WINDING : 0; |
| 672 path.CalcBoundingBox(); | 672 path.CalcBoundingBox(); |
| 673 ProcessPath(&path, pObj2Device); | 673 ProcessPath(&path, pObj2Device); |
| 674 } | 674 } |
| 675 } | 675 } |
| OLD | NEW |