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 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
9 | 9 |
10 DLLEXPORT void STDCALL FPDFPage_SetMediaBox(FPDF_PAGE page, float left, float bo
ttom, float right, float top) | 10 DLLEXPORT void STDCALL FPDFPage_SetMediaBox(FPDF_PAGE page, float left, float bo
ttom, float right, float top) |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 pNewClipPath->GetModify(); | 204 pNewClipPath->GetModify(); |
205 CPDF_Path Path; | 205 CPDF_Path Path; |
206 Path.GetModify(); | 206 Path.GetModify(); |
207 Path.AppendRect(left, bottom, right, top); | 207 Path.AppendRect(left, bottom, right, top); |
208 pNewClipPath->AppendPath(Path, FXFILL_ALTERNATE, FALSE); | 208 pNewClipPath->AppendPath(Path, FXFILL_ALTERNATE, FALSE); |
209 return pNewClipPath; | 209 return pNewClipPath; |
210 } | 210 } |
211 | 211 |
212 DLLEXPORT void STDCALL FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath) | 212 DLLEXPORT void STDCALL FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath) |
213 { | 213 { |
214 » if(clipPath) | 214 delete (CPDF_ClipPath*)clipPath; |
215 » » delete (CPDF_ClipPath*)clipPath; | |
216 } | 215 } |
217 | 216 |
218 void OutputPath(CFX_ByteTextBuf& buf, CPDF_Path path) | 217 void OutputPath(CFX_ByteTextBuf& buf, CPDF_Path path) |
219 { | 218 { |
220 const CFX_PathData* pPathData = path; | 219 const CFX_PathData* pPathData = path; |
221 if (pPathData == NULL) return; | 220 if (pPathData == NULL) return; |
222 | 221 |
223 FX_PATHPOINT* pPoints = pPathData->GetPoints(); | 222 FX_PATHPOINT* pPoints = pPathData->GetPoints(); |
224 | 223 |
225 if (path.IsRect()) { | 224 if (path.IsRect()) { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 { | 311 { |
313 pContentArray = new CPDF_Array(); | 312 pContentArray = new CPDF_Array(); |
314 pContentArray->AddReference(pDoc,pStream->GetObj
Num()); | 313 pContentArray->AddReference(pDoc,pStream->GetObj
Num()); |
315 pContentArray->AddReference(pDoc,pDirectObj->Get
ObjNum()); | 314 pContentArray->AddReference(pDoc,pDirectObj->Get
ObjNum()); |
316 pPageDic->SetAtReference("Contents", pDoc, pDoc-
>AddIndirectObject(pContentArray)); | 315 pPageDic->SetAtReference("Contents", pDoc, pDoc-
>AddIndirectObject(pContentArray)); |
317 } | 316 } |
318 } | 317 } |
319 } | 318 } |
320 } | 319 } |
321 | 320 |
OLD | NEW |