| 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 #ifndef CORE_SRC_FXGE_APPLE_APPLE_INT_H_ | 7 #ifndef CORE_SRC_FXGE_APPLE_APPLE_INT_H_ |
| 8 #define CORE_SRC_FXGE_APPLE_APPLE_INT_H_ | 8 #define CORE_SRC_FXGE_APPLE_APPLE_INT_H_ |
| 9 | 9 |
| 10 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ | 10 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 void destroyGraphics(void* graphics); | 49 void destroyGraphics(void* graphics); |
| 50 | 50 |
| 51 void* CreateFont(FX_LPCBYTE pFontData, FX_DWORD dwFontSize); | 51 void* CreateFont(FX_LPCBYTE pFontData, FX_DWORD dwFontSize); |
| 52 void DestroyFont(void* pFont); | 52 void DestroyFont(void* pFont); |
| 53 void setGraphicsTextMatrix(void* graphics, CFX_AffineMatrix* matrix); | 53 void setGraphicsTextMatrix(void* graphics, CFX_AffineMatrix* matrix); |
| 54 FX_BOOL drawGraphicsString(void* graphics, | 54 FX_BOOL drawGraphicsString(void* graphics, |
| 55 void* font, | 55 void* font, |
| 56 FX_FLOAT fontSize, | 56 FX_FLOAT fontSize, |
| 57 FX_WORD* glyphIndices, | 57 FX_WORD* glyphIndices, |
| 58 CGPoint* glyphPositions, | 58 CGPoint* glyphPositions, |
| 59 FX_INT32 chars, | 59 int32_t chars, |
| 60 FX_ARGB argb, | 60 FX_ARGB argb, |
| 61 CFX_AffineMatrix* matrix = NULL); | 61 CFX_AffineMatrix* matrix = NULL); |
| 62 void saveGraphicsState(void* graphics); | 62 void saveGraphicsState(void* graphics); |
| 63 void restoreGraphicsState(void* graphics); | 63 void restoreGraphicsState(void* graphics); |
| 64 }; | 64 }; |
| 65 class CApplePlatform | 65 class CApplePlatform |
| 66 { | 66 { |
| 67 public: | 67 public: |
| 68 CApplePlatform() | 68 CApplePlatform() |
| 69 { | 69 { |
| 70 m_pFontMapper = NULL; | 70 m_pFontMapper = NULL; |
| 71 } | 71 } |
| 72 ~CApplePlatform() | 72 ~CApplePlatform() |
| 73 { | 73 { |
| 74 if (m_pFontMapper) { | 74 if (m_pFontMapper) { |
| 75 delete m_pFontMapper; | 75 delete m_pFontMapper; |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 CQuartz2D _quartz2d; | 78 CQuartz2D _quartz2d; |
| 79 IFX_FontMapper* m_pFontMapper; | 79 IFX_FontMapper* m_pFontMapper; |
| 80 }; | 80 }; |
| 81 class CFX_QuartzDeviceDriver : public IFX_RenderDeviceDriver | 81 class CFX_QuartzDeviceDriver : public IFX_RenderDeviceDriver |
| 82 { | 82 { |
| 83 public: | 83 public: |
| 84 CFX_QuartzDeviceDriver(CGContextRef context, FX_INT32 deviceClass); | 84 CFX_QuartzDeviceDriver(CGContextRef context, int32_t deviceClass); |
| 85 virtual ~CFX_QuartzDeviceDriver(); | 85 virtual ~CFX_QuartzDeviceDriver(); |
| 86 | 86 |
| 87 virtual int GetDeviceCaps(int caps_id); | 87 virtual int GetDeviceCaps(int caps_id); |
| 88 virtual CFX_Matrix GetCTM() const; | 88 virtual CFX_Matrix GetCTM() const; |
| 89 virtual CFX_DIBitmap* GetBackDrop() | 89 virtual CFX_DIBitmap* GetBackDrop() |
| 90 { | 90 { |
| 91 return NULL; | 91 return NULL; |
| 92 } | 92 } |
| 93 virtual void* GetPlatformSurface() | 93 virtual void* GetPlatformSurface() |
| 94 { | 94 { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 const CFX_AffineMatrix* pObject2Device, | 169 const CFX_AffineMatrix* pObject2Device, |
| 170 FX_FLOAT font_size, | 170 FX_FLOAT font_size, |
| 171 FX_DWORD argb, | 171 FX_DWORD argb, |
| 172 int alpha_flag, | 172 int alpha_flag, |
| 173 void* pIccTransform); | 173 void* pIccTransform); |
| 174 void CG_SetImageTransform(int dest_left, int dest_top, int dest_width, in
t dest_height, CGRect* rect = NULL); | 174 void CG_SetImageTransform(int dest_left, int dest_top, int dest_width, in
t dest_height, CGRect* rect = NULL); |
| 175 protected: | 175 protected: |
| 176 CGContextRef _context; | 176 CGContextRef _context; |
| 177 CGAffineTransform _foxitDevice2User; | 177 CGAffineTransform _foxitDevice2User; |
| 178 CGAffineTransform _user2FoxitDevice; | 178 CGAffineTransform _user2FoxitDevice; |
| 179 FX_INT32 m_saveCount; | 179 int32_t m_saveCount; |
| 180 | 180 |
| 181 FX_INT32» » _width; | 181 int32_t» » _width; |
| 182 FX_INT32» » _height; | 182 int32_t» » _height; |
| 183 FX_INT32» » _bitsPerPixel; | 183 int32_t» » _bitsPerPixel; |
| 184 FX_INT32» » _deviceClass; | 184 int32_t» » _deviceClass; |
| 185 FX_INT32» » _renderCaps; | 185 int32_t» » _renderCaps; |
| 186 FX_INT32» _horzSize; | 186 int32_t» _horzSize; |
| 187 FX_INT32» _vertSize; | 187 int32_t» _vertSize; |
| 188 }; | 188 }; |
| 189 class CFX_FontProvider final : public IFX_FileRead | 189 class CFX_FontProvider final : public IFX_FileRead |
| 190 { | 190 { |
| 191 public: | 191 public: |
| 192 virtual void Release() override | 192 virtual void Release() override |
| 193 { | 193 { |
| 194 delete this; | 194 delete this; |
| 195 } | 195 } |
| 196 virtual FX_FILESIZE GetSize() override | 196 virtual FX_FILESIZE GetSize() override |
| 197 { | 197 { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 uint32_t fCheckSum; | 232 uint32_t fCheckSum; |
| 233 uint32_t fOffset; | 233 uint32_t fOffset; |
| 234 uint32_t fLength; | 234 uint32_t fLength; |
| 235 } TableEntry; | 235 } TableEntry; |
| 236 FontHeader _fontHeader; | 236 FontHeader _fontHeader; |
| 237 unsigned char * _tableEntries; | 237 unsigned char * _tableEntries; |
| 238 size_t * _tableOffsets; | 238 size_t * _tableOffsets; |
| 239 int _tableCount; | 239 int _tableCount; |
| 240 int _totalSize; | 240 int _totalSize; |
| 241 }; | 241 }; |
| 242 FX_UINT32 FX_GetHashCode( FX_LPCSTR pStr); | 242 uint32_t FX_GetHashCode( FX_LPCSTR pStr); |
| 243 FX_DWORD FX_IOSGetMatchFamilyNameHashcode(FX_LPCSTR pFontName); | 243 FX_DWORD FX_IOSGetMatchFamilyNameHashcode(FX_LPCSTR pFontName); |
| 244 FX_UINT32 FX_IOSGetFamilyNamesCount(); | 244 uint32_t FX_IOSGetFamilyNamesCount(); |
| 245 FX_LPCSTR FX_IOSGetFamilyName( FX_UINT32 uIndex); | 245 FX_LPCSTR FX_IOSGetFamilyName( uint32_t uIndex); |
| 246 #endif | 246 #endif |
| 247 | 247 |
| 248 #endif // CORE_SRC_FXGE_APPLE_APPLE_INT_H_ | 248 #endif // CORE_SRC_FXGE_APPLE_APPLE_INT_H_ |
| OLD | NEW |