| 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 if (fill_alpha == 255) { | 423 if (fill_alpha == 255) { |
| 424 CPDF_RenderStatus status; | 424 CPDF_RenderStatus status; |
| 425 status.Initialize(m_pContext, m_pDevice, NULL, NULL, this, pStates, | 425 status.Initialize(m_pContext, m_pDevice, NULL, NULL, this, pStates, |
| 426 &Options, pType3Char->m_pForm->m_Transparency, | 426 &Options, pType3Char->m_pForm->m_Transparency, |
| 427 m_bDropObjects, pFormResource, FALSE, pType3Char, | 427 m_bDropObjects, pFormResource, FALSE, pType3Char, |
| 428 fill_argb); | 428 fill_argb); |
| 429 status.m_Type3FontCache.Append(m_Type3FontCache); | 429 status.m_Type3FontCache.Append(m_Type3FontCache); |
| 430 status.m_Type3FontCache.Add(pType3Font); | 430 status.m_Type3FontCache.Add(pType3Font); |
| 431 m_pDevice->SaveState(); | 431 m_pDevice->SaveState(); |
| 432 status.RenderObjectList(pType3Char->m_pForm.get(), &matrix); | 432 status.RenderObjectList(pType3Char->m_pForm.get(), &matrix); |
| 433 m_pDevice->RestoreState(); | 433 m_pDevice->RestoreState(false); |
| 434 } else { | 434 } else { |
| 435 CFX_FloatRect rect_f = pType3Char->m_pForm->CalcBoundingBox(); | 435 CFX_FloatRect rect_f = pType3Char->m_pForm->CalcBoundingBox(); |
| 436 rect_f.Transform(&matrix); | 436 rect_f.Transform(&matrix); |
| 437 FX_RECT rect = rect_f.GetOutterRect(); | 437 FX_RECT rect = rect_f.GetOutterRect(); |
| 438 CFX_FxgeDevice bitmap_device; | 438 CFX_FxgeDevice bitmap_device; |
| 439 if (!bitmap_device.Create((int)(rect.Width() * sa), | 439 if (!bitmap_device.Create((int)(rect.Width() * sa), |
| 440 (int)(rect.Height() * sd), FXDIB_Argb)) { | 440 (int)(rect.Height() * sd), FXDIB_Argb)) { |
| 441 return TRUE; | 441 return TRUE; |
| 442 } | 442 } |
| 443 bitmap_device.GetBitmap()->Clear(0); | 443 bitmap_device.GetBitmap()->Clear(0); |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, | 784 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, |
| 785 charpos.m_OriginY); | 785 charpos.m_OriginY); |
| 786 path.m_Path.New()->Append(pPath, &matrix); | 786 path.m_Path.New()->Append(pPath, &matrix); |
| 787 path.m_Matrix = *pTextMatrix; | 787 path.m_Matrix = *pTextMatrix; |
| 788 path.m_bStroke = bStroke; | 788 path.m_bStroke = bStroke; |
| 789 path.m_FillType = bFill ? FXFILL_WINDING : 0; | 789 path.m_FillType = bFill ? FXFILL_WINDING : 0; |
| 790 path.CalcBoundingBox(); | 790 path.CalcBoundingBox(); |
| 791 ProcessPath(&path, pObj2Device); | 791 ProcessPath(&path, pObj2Device); |
| 792 } | 792 } |
| 793 } | 793 } |
| OLD | NEW |