| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 // realize it. Fall through. | 272 // realize it. Fall through. |
| 273 ASSERT(false); | 273 ASSERT(false); |
| 274 case TextRenderingMode::MODE_CLIP: | 274 case TextRenderingMode::MODE_CLIP: |
| 275 return TRUE; | 275 return TRUE; |
| 276 } | 276 } |
| 277 } | 277 } |
| 278 FX_ARGB stroke_argb = 0; | 278 FX_ARGB stroke_argb = 0; |
| 279 FX_ARGB fill_argb = 0; | 279 FX_ARGB fill_argb = 0; |
| 280 bool bPattern = false; | 280 bool bPattern = false; |
| 281 if (bStroke) { | 281 if (bStroke) { |
| 282 if (textobj->m_ColorState->GetStrokeColor()->IsPattern()) { | 282 if (textobj->m_ColorState.GetStrokeColor()->IsPattern()) { |
| 283 bPattern = true; | 283 bPattern = true; |
| 284 } else { | 284 } else { |
| 285 stroke_argb = GetStrokeArgb(textobj); | 285 stroke_argb = GetStrokeArgb(textobj); |
| 286 } | 286 } |
| 287 } | 287 } |
| 288 if (bFill) { | 288 if (bFill) { |
| 289 if (textobj->m_ColorState->GetFillColor()->IsPattern()) { | 289 if (textobj->m_ColorState.GetFillColor()->IsPattern()) { |
| 290 bPattern = true; | 290 bPattern = true; |
| 291 } else { | 291 } else { |
| 292 fill_argb = GetFillArgb(textobj); | 292 fill_argb = GetFillArgb(textobj); |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 CFX_Matrix text_matrix; | 295 CFX_Matrix text_matrix; |
| 296 textobj->GetTextMatrix(&text_matrix); | 296 textobj->GetTextMatrix(&text_matrix); |
| 297 if (!IsAvailableMatrix(text_matrix)) | 297 if (!IsAvailableMatrix(text_matrix)) |
| 298 return TRUE; | 298 return TRUE; |
| 299 | 299 |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, | 864 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, |
| 865 charpos.m_OriginY); | 865 charpos.m_OriginY); |
| 866 path.m_Path.New()->Append(pPath, &matrix); | 866 path.m_Path.New()->Append(pPath, &matrix); |
| 867 path.m_Matrix = *pTextMatrix; | 867 path.m_Matrix = *pTextMatrix; |
| 868 path.m_bStroke = bStroke; | 868 path.m_bStroke = bStroke; |
| 869 path.m_FillType = bFill ? FXFILL_WINDING : 0; | 869 path.m_FillType = bFill ? FXFILL_WINDING : 0; |
| 870 path.CalcBoundingBox(); | 870 path.CalcBoundingBox(); |
| 871 ProcessPath(&path, pObj2Device); | 871 ProcessPath(&path, pObj2Device); |
| 872 } | 872 } |
| 873 } | 873 } |
| OLD | NEW |