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

Side by Side Diff: fpdfsdk/fpdf_transformpage.cpp

Issue 2045083003: Remove implicit CFX_CountedRef::operator T*() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix mac build. Created 4 years, 6 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
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 "public/fpdf_transformpage.h" 7 #include "public/fpdf_transformpage.h"
8 8
9 #include "core/fpdfapi/fpdf_page/include/cpdf_clippath.h" 9 #include "core/fpdfapi/fpdf_page/include/cpdf_clippath.h"
10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 Path.AppendRect(left, bottom, right, top); 225 Path.AppendRect(left, bottom, right, top);
226 pNewClipPath->AppendPath(Path, FXFILL_ALTERNATE, FALSE); 226 pNewClipPath->AppendPath(Path, FXFILL_ALTERNATE, FALSE);
227 return pNewClipPath; 227 return pNewClipPath;
228 } 228 }
229 229
230 DLLEXPORT void STDCALL FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath) { 230 DLLEXPORT void STDCALL FPDF_DestroyClipPath(FPDF_CLIPPATH clipPath) {
231 delete (CPDF_ClipPath*)clipPath; 231 delete (CPDF_ClipPath*)clipPath;
232 } 232 }
233 233
234 void OutputPath(CFX_ByteTextBuf& buf, CPDF_Path path) { 234 void OutputPath(CFX_ByteTextBuf& buf, CPDF_Path path) {
235 const CFX_PathData* pPathData = path; 235 const CFX_PathData* pPathData = path.GetObject();
236 if (!pPathData) 236 if (!pPathData)
237 return; 237 return;
238 238
239 FX_PATHPOINT* pPoints = pPathData->GetPoints(); 239 FX_PATHPOINT* pPoints = pPathData->GetPoints();
240 240
241 if (path.IsRect()) { 241 if (path.IsRect()) {
242 buf << (pPoints[0].m_PointX) << " " << (pPoints[0].m_PointY) << " " 242 buf << (pPoints[0].m_PointX) << " " << (pPoints[0].m_PointY) << " "
243 << (pPoints[2].m_PointX - pPoints[0].m_PointX) << " " 243 << (pPoints[2].m_PointX - pPoints[0].m_PointX) << " "
244 << (pPoints[2].m_PointY - pPoints[0].m_PointY) << " re\n"; 244 << (pPoints[2].m_PointY - pPoints[0].m_PointY) << " re\n";
245 return; 245 return;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } else if (pDirectObj->IsStream()) { 325 } else if (pDirectObj->IsStream()) {
326 pContentArray = new CPDF_Array(); 326 pContentArray = new CPDF_Array();
327 pContentArray->AddReference(pDoc, pStream->GetObjNum()); 327 pContentArray->AddReference(pDoc, pStream->GetObjNum());
328 pContentArray->AddReference(pDoc, pDirectObj->GetObjNum()); 328 pContentArray->AddReference(pDoc, pDirectObj->GetObjNum());
329 pPageDic->SetAtReference("Contents", pDoc, 329 pPageDic->SetAtReference("Contents", pDoc,
330 pDoc->AddIndirectObject(pContentArray)); 330 pDoc->AddIndirectObject(pContentArray));
331 } 331 }
332 } 332 }
333 } 333 }
334 } 334 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698