| 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_DESKTOP_ | 8 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include "../../../include/fxge/fx_ge_win32.h" | 10 #include "../../../include/fxge/fx_ge_win32.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 handle = NULL; | 276 handle = NULL; |
| 277 return ret; | 277 return ret; |
| 278 } | 278 } |
| 279 return FALSE; | 279 return FALSE; |
| 280 } | 280 } |
| 281 CPSOutput::CPSOutput(HDC hDC) { | 281 CPSOutput::CPSOutput(HDC hDC) { |
| 282 m_hDC = hDC; | 282 m_hDC = hDC; |
| 283 m_pBuf = NULL; | 283 m_pBuf = NULL; |
| 284 } | 284 } |
| 285 CPSOutput::~CPSOutput() { | 285 CPSOutput::~CPSOutput() { |
| 286 if (m_pBuf) { | |
| 287 FX_Free(m_pBuf); | 286 FX_Free(m_pBuf); |
| 288 } | |
| 289 } | 287 } |
| 290 void CPSOutput::Init() { | 288 void CPSOutput::Init() { |
| 291 m_pBuf = FX_Alloc(FX_CHAR, 1026); | 289 m_pBuf = FX_Alloc(FX_CHAR, 1026); |
| 292 } | 290 } |
| 293 void CPSOutput::OutputPS(const FX_CHAR* string, int len) { | 291 void CPSOutput::OutputPS(const FX_CHAR* string, int len) { |
| 294 if (len < 0) { | 292 if (len < 0) { |
| 295 len = (int)FXSYS_strlen(string); | 293 len = (int)FXSYS_strlen(string); |
| 296 } | 294 } |
| 297 int sent_len = 0; | 295 int sent_len = 0; |
| 298 while (len > 0) { | 296 while (len > 0) { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 CFX_FontCache* pCache, | 466 CFX_FontCache* pCache, |
| 469 const CFX_AffineMatrix* pObject2Device, | 467 const CFX_AffineMatrix* pObject2Device, |
| 470 FX_FLOAT font_size, | 468 FX_FLOAT font_size, |
| 471 FX_DWORD color, | 469 FX_DWORD color, |
| 472 int alpha_flag, | 470 int alpha_flag, |
| 473 void* pIccTransform) { | 471 void* pIccTransform) { |
| 474 return m_PSRenderer.DrawText(nChars, pCharPos, pFont, pCache, pObject2Device, | 472 return m_PSRenderer.DrawText(nChars, pCharPos, pFont, pCache, pObject2Device, |
| 475 font_size, color, alpha_flag, pIccTransform); | 473 font_size, color, alpha_flag, pIccTransform); |
| 476 } | 474 } |
| 477 #endif | 475 #endif |
| OLD | NEW |