Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Side by Side Diff: core/fpdfapi/fpdf_render/fpdf_render_text.cpp

Issue 2294553002: Revert "Use ->() in CPDF_ColorState" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp ('k') | fpdfsdk/fxedit/fxet_edit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp ('k') | fpdfsdk/fxedit/fxet_edit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698