| 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 "public/fpdf_transformpage.h" | 7 #include "public/fpdf_transformpage.h" |
| 8 | 8 |
| 9 #include "fpdfsdk/include/fsdk_define.h" | 9 #include "fpdfsdk/include/fsdk_define.h" |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 double e, | 193 double e, |
| 194 double f) { | 194 double f) { |
| 195 CPDF_PageObject* pPageObj = (CPDF_PageObject*)page_object; | 195 CPDF_PageObject* pPageObj = (CPDF_PageObject*)page_object; |
| 196 if (!pPageObj) | 196 if (!pPageObj) |
| 197 return; | 197 return; |
| 198 CFX_Matrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, | 198 CFX_Matrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, |
| 199 (FX_FLOAT)e, (FX_FLOAT)f); | 199 (FX_FLOAT)e, (FX_FLOAT)f); |
| 200 | 200 |
| 201 // Special treatment to shading object, because the ClipPath for shading | 201 // Special treatment to shading object, because the ClipPath for shading |
| 202 // object is already transformed. | 202 // object is already transformed. |
| 203 if (pPageObj->m_Type != PDFPAGE_SHADING) | 203 if (pPageObj->m_Type != CPDF_PageObject::SHADING) |
| 204 pPageObj->TransformClipPath(matrix); | 204 pPageObj->TransformClipPath(matrix); |
| 205 pPageObj->TransformGeneralState(matrix); | 205 pPageObj->TransformGeneralState(matrix); |
| 206 } | 206 } |
| 207 | 207 |
| 208 DLLEXPORT FPDF_CLIPPATH STDCALL FPDF_CreateClipPath(float left, | 208 DLLEXPORT FPDF_CLIPPATH STDCALL FPDF_CreateClipPath(float left, |
| 209 float bottom, | 209 float bottom, |
| 210 float right, | 210 float right, |
| 211 float top) { | 211 float top) { |
| 212 CPDF_ClipPath* pNewClipPath = new CPDF_ClipPath(); | 212 CPDF_ClipPath* pNewClipPath = new CPDF_ClipPath(); |
| 213 pNewClipPath->GetModify(); | 213 pNewClipPath->GetModify(); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } else if (pDirectObj->IsStream()) { | 314 } else if (pDirectObj->IsStream()) { |
| 315 pContentArray = new CPDF_Array(); | 315 pContentArray = new CPDF_Array(); |
| 316 pContentArray->AddReference(pDoc, pStream->GetObjNum()); | 316 pContentArray->AddReference(pDoc, pStream->GetObjNum()); |
| 317 pContentArray->AddReference(pDoc, pDirectObj->GetObjNum()); | 317 pContentArray->AddReference(pDoc, pDirectObj->GetObjNum()); |
| 318 pPageDic->SetAtReference("Contents", pDoc, | 318 pPageDic->SetAtReference("Contents", pDoc, |
| 319 pDoc->AddIndirectObject(pContentArray)); | 319 pDoc->AddIndirectObject(pContentArray)); |
| 320 } | 320 } |
| 321 } | 321 } |
| 322 } | 322 } |
| 323 } | 323 } |
| OLD | NEW |