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_FXGE_APPLE_APPLE_INT_H_ 8 #define CORE_FXGE_APPLE_APPLE_INT_H_ 9 10 #include "core/fxcrt/fx_system.h" 11 12 #include "core/fxge/cfx_graphstatedata.h" 13 #include "core/fxge/cfx_pathdata.h" 14 #include "core/fxge/cfx_renderdevice.h" 15 #include "core/fxge/fx_dib.h" 16 #include "core/fxge/ifx_renderdevicedriver.h" 17 18 #include <Carbon/Carbon.h> 19 20 class CQuartz2D { 21 public: 22 void* createGraphics(CFX_DIBitmap* bitmap); 23 void destroyGraphics(void* graphics); 24 25 void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize); 26 void DestroyFont(void* pFont); 27 void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix); 28 bool drawGraphicsString(void* graphics, 29 void* font, 30 FX_FLOAT fontSize, 31 uint16_t* glyphIndices, 32 CGPoint* glyphPositions, 33 int32_t chars, 34 FX_ARGB argb, 35 CFX_Matrix* matrix = nullptr); 36 void saveGraphicsState(void* graphics); 37 void restoreGraphicsState(void* graphics); 38 }; 39 40 class CApplePlatform { 41 public: 42 CApplePlatform() {} 43 ~CApplePlatform() {} 44 45 CQuartz2D m_quartz2d; 46 }; 47 48 #endif // CORE_FXGE_APPLE_APPLE_INT_H_ 49