| 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 "../../../include/fxge/fx_ge_win32.h" | 9 #include "../../../include/fxge/fx_ge_win32.h" |
| 10 #include "dwrite_int.h" | 10 #include "dwrite_int.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 pMatrix ? &transform : NULL, | 255 pMatrix ? &transform : NULL, |
| 256 baselineOriginX, baselineOriginY, | 256 baselineOriginX, baselineOriginY, |
| 257 DWRITE_MEASURING_MODE_NATURAL, | 257 DWRITE_MEASURING_MODE_NATURAL, |
| 258 &glyphRun, | 258 &glyphRun, |
| 259 RGB(FXARGB_R(text_color), FXARGB_G(text_color), FXARGB_B(text_color
)) | 259 RGB(FXARGB_R(text_color), FXARGB_G(text_color), FXARGB_B(text_color
)) |
| 260 ); | 260 ); |
| 261 return SUCCEEDED(hr) ? TRUE : FALSE; | 261 return SUCCEEDED(hr) ? TRUE : FALSE; |
| 262 } | 262 } |
| 263 void CDWriteExt::DwDeleteRenderingTarget(void* renderTarget) | 263 void CDWriteExt::DwDeleteRenderingTarget(void* renderTarget) |
| 264 { | 264 { |
| 265 if (renderTarget) { | 265 delete (CDwGdiTextRenderer*)renderTarget; |
| 266 delete (CDwGdiTextRenderer*)renderTarget; | |
| 267 } | |
| 268 } | 266 } |
| 269 void CDWriteExt::DwDeleteFont(void* pFont) | 267 void CDWriteExt::DwDeleteFont(void* pFont) |
| 270 { | 268 { |
| 271 if (pFont) { | 269 if (pFont) { |
| 272 SafeRelease((IDWriteFontFace**)&pFont); | 270 SafeRelease((IDWriteFontFace**)&pFont); |
| 273 } | 271 } |
| 274 } | 272 } |
| 275 CDwFontFileStream::CDwFontFileStream(void const* fontFileReferenceKey, UINT32 fo
ntFileReferenceKeySize) | 273 CDwFontFileStream::CDwFontFileStream(void const* fontFileReferenceKey, UINT32 fo
ntFileReferenceKeySize) |
| 276 { | 274 { |
| 277 refCount_ = 0; | 275 refCount_ = 0; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 text_bbox.Height(), | 462 text_bbox.Height(), |
| 465 &dib, | 463 &dib, |
| 466 text_bbox.left, | 464 text_bbox.left, |
| 467 text_bbox.top, | 465 text_bbox.top, |
| 468 FXDIB_BLEND_NORMAL, | 466 FXDIB_BLEND_NORMAL, |
| 469 pClipRgn | 467 pClipRgn |
| 470 ); | 468 ); |
| 471 return hr; | 469 return hr; |
| 472 } | 470 } |
| 473 #endif | 471 #endif |
| OLD | NEW |