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 "../../../include/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ | 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <gdiplus.h> | 10 #include <gdiplus.h> |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 } | 996 } |
997 if (pMatrix) { | 997 if (pMatrix) { |
998 CallFunc(GdipDeleteMatrix)(pMatrix); | 998 CallFunc(GdipDeleteMatrix)(pMatrix); |
999 } | 999 } |
1000 FX_Free(points); | 1000 FX_Free(points); |
1001 FX_Free(types); | 1001 FX_Free(types); |
1002 CallFunc(GdipDeletePath)(pGpPath); | 1002 CallFunc(GdipDeletePath)(pGpPath); |
1003 CallFunc(GdipDeleteGraphics)(pGraphics); | 1003 CallFunc(GdipDeleteGraphics)(pGraphics); |
1004 return TRUE; | 1004 return TRUE; |
1005 } | 1005 } |
1006 class GpStream : public IStream, public CFX_Object | 1006 class GpStream FX_FINAL : public IStream, public CFX_Object |
1007 { | 1007 { |
1008 LONG m_RefCount; | 1008 LONG m_RefCount; |
1009 int m_ReadPos; | 1009 int m_ReadPos; |
1010 CFX_ByteTextBuf m_InterStream; | 1010 CFX_ByteTextBuf m_InterStream; |
1011 public: | 1011 public: |
1012 GpStream() | 1012 GpStream() |
1013 { | 1013 { |
1014 m_RefCount = 1; | 1014 m_RefCount = 1; |
1015 m_ReadPos = 0; | 1015 m_ReadPos = 0; |
1016 } | 1016 } |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 FXSYS_memcpy32(pData, pInfo->pScan0, dest_pitch * height); | 1276 FXSYS_memcpy32(pData, pInfo->pScan0, dest_pitch * height); |
1277 } else for (int i = 0; i < height; i ++) { | 1277 } else for (int i = 0; i < height; i ++) { |
1278 FXSYS_memcpy32(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride
* i, dest_pitch); | 1278 FXSYS_memcpy32(pData + dest_pitch * i, pInfo->pScan0 + pInfo->Stride
* i, dest_pitch); |
1279 } | 1279 } |
1280 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf(pInfo->pbmi, pData, pIn
fo->pbmi->bmiHeader.biBitCount == 32); | 1280 CFX_DIBitmap* pDIBitmap = _FX_WindowsDIB_LoadFromBuf(pInfo->pbmi, pData, pIn
fo->pbmi->bmiHeader.biBitCount == 32); |
1281 FX_Free(pData); | 1281 FX_Free(pData); |
1282 FreeDIBitmap(pInfo); | 1282 FreeDIBitmap(pInfo); |
1283 return pDIBitmap; | 1283 return pDIBitmap; |
1284 } | 1284 } |
1285 #endif | 1285 #endif |
OLD | NEW |