diff options
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfview.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index 96d1ff0e31..10bfc3db2c 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -1,7 +1,7 @@ // Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../core/include/fxcrt/fx_safe_types.h" @@ -111,10 +111,10 @@ CFontMapper* g_pFontMapper = NULL; DLLEXPORT void STDCALL FPDF_InitLibrary() { g_pCodecModule = CCodec_ModuleMgr::Create(); - + CFX_GEModule::Create(); CFX_GEModule::Get()->SetCodecModule(g_pCodecModule); - + CPDF_ModuleMgr::Create(); CPDF_ModuleMgr::Get()->SetCodecModule(g_pCodecModule); CPDF_ModuleMgr::Get()->InitPageModule(); @@ -206,7 +206,7 @@ public: virtual void Release() {delete this;} virtual FX_FILESIZE GetSize() {return m_size;} - virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) + virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) { if (offset < 0) { return FALSE; @@ -356,7 +356,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int bBackgroundAlphaNeeded = pPage->BackgroundAlphaNeeded(); if (bBackgroundAlphaNeeded) { - + pBitmap = new CFX_DIBitmap; pBitmap->Create(size_x, size_y, FXDIB_Argb); pBitmap->Clear(0x00ffffff); @@ -373,12 +373,12 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int Func_RenderPage(pContext, page, start_x, start_y, size_x, size_y, rotate, flags,TRUE,NULL); - if (bBackgroundAlphaNeeded) + if (bBackgroundAlphaNeeded) { if (pBitmap) { CFX_WindowsDevice WinDC(dc); - + if (WinDC.GetDeviceCaps(FXDC_DEVICE_CLASS) == FXDC_PRINTER) { CFX_DIBitmap* pDst = new CFX_DIBitmap; @@ -499,7 +499,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int } #endif -DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, +DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags) { if (bitmap == NULL || page == NULL) return; @@ -546,9 +546,9 @@ DLLEXPORT void STDCALL FPDF_CloseDocument(FPDF_DOCUMENT document) { if (!document) return; - CPDF_Document* pDoc = (CPDF_Document*)document; + CPDF_Document* pDoc = (CPDF_Document*)document; CPDF_Parser* pParser = (CPDF_Parser*)pDoc->GetParser(); - if (pParser == NULL) + if (pParser == NULL) { delete pDoc; return; @@ -713,7 +713,7 @@ void FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page, int start_ CFX_AffineMatrix matrix; - pPage->GetDisplayMatrix(matrix, start_x, start_y, size_x, size_y, rotate); + pPage->GetDisplayMatrix(matrix, start_x, start_y, size_x, size_y, rotate); FX_RECT clip; clip.left = start_x; @@ -817,7 +817,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_ { if (!document) return NULL; - if (!name || name[0] == 0) + if (!name || name[0] == 0) return NULL; CPDF_Document* pDoc = (CPDF_Document*)document; |