1 // Copyright 2014 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_INCLUDE_FXGE_FX_GE_APPLE_H_ 8 #define CORE_INCLUDE_FXGE_FX_GE_APPLE_H_ 9 10 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 11 class CFX_QuartzDevice : public CFX_RenderDevice 12 { 13 public: 14 CFX_QuartzDevice(); 15 ~CFX_QuartzDevice(); 16 FX_BOOL Attach(CGContextRef context, FX_INT32 nDeviceClass = FXDC_DISPLAY); 17 FX_BOOL Attach(CFX_DIBitmap* pBitmap); 18 FX_BOOL Create(FX_INT32 width, FX_INT32 height, FXDIB_Format format); 19 20 CGContextRef GetContext(); 21 22 protected: 23 CGContextRef m_pContext; 24 FX_BOOL m_bOwnedBitmap; 25 }; 26 #endif 27 28 #endif // CORE_INCLUDE_FXGE_FX_GE_APPLE_H_ 29