| 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_FXGE_APPLE_APPLE_INT_H_ | 7 #ifndef CORE_FXGE_APPLE_APPLE_INT_H_ |
| 8 #define CORE_FXGE_APPLE_APPLE_INT_H_ | 8 #define CORE_FXGE_APPLE_APPLE_INT_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_system.h" | 10 #include "core/fxcrt/include/fx_system.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 class CFX_QuartzDeviceDriver : public IFX_RenderDeviceDriver { | 82 class CFX_QuartzDeviceDriver : public IFX_RenderDeviceDriver { |
| 83 public: | 83 public: |
| 84 CFX_QuartzDeviceDriver(CGContextRef context, int32_t deviceClass); | 84 CFX_QuartzDeviceDriver(CGContextRef context, int32_t deviceClass); |
| 85 ~CFX_QuartzDeviceDriver() override; | 85 ~CFX_QuartzDeviceDriver() override; |
| 86 | 86 |
| 87 // IFX_RenderDeviceDriver | 87 // IFX_RenderDeviceDriver |
| 88 int GetDeviceCaps(int caps_id) override; | 88 int GetDeviceCaps(int caps_id) override; |
| 89 CFX_Matrix GetCTM() const override; | 89 CFX_Matrix GetCTM() const override; |
| 90 FX_BOOL IsPSPrintDriver() override { return FALSE; } | |
| 91 FX_BOOL StartRendering() override { return TRUE; } | |
| 92 void EndRendering() override {} | |
| 93 void SaveState() override; | 90 void SaveState() override; |
| 94 void RestoreState(bool bKeepSaved) override; | 91 void RestoreState(bool bKeepSaved) override; |
| 95 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, | 92 FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, |
| 96 const CFX_Matrix* pObject2Device, | 93 const CFX_Matrix* pObject2Device, |
| 97 int fill_mode) override; | 94 int fill_mode) override; |
| 98 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | 95 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, |
| 99 const CFX_Matrix* pObject2Device, | 96 const CFX_Matrix* pObject2Device, |
| 100 const CFX_GraphStateData* pGraphState) override; | 97 const CFX_GraphStateData* pGraphState) override; |
| 101 FX_BOOL DrawPath(const CFX_PathData* pPathData, | 98 FX_BOOL DrawPath(const CFX_PathData* pPathData, |
| 102 const CFX_Matrix* pObject2Device, | 99 const CFX_Matrix* pObject2Device, |
| 103 const CFX_GraphStateData* pGraphState, | 100 const CFX_GraphStateData* pGraphState, |
| 104 uint32_t fill_color, | 101 uint32_t fill_color, |
| 105 uint32_t stroke_color, | 102 uint32_t stroke_color, |
| 106 int fill_mode, | 103 int fill_mode, |
| 107 int alpha_flag = 0, | 104 int alpha_flag = 0, |
| 108 void* pIccTransform = NULL, | 105 void* pIccTransform = NULL, |
| 109 int blend_type = FXDIB_BLEND_NORMAL) override; | 106 int blend_type = FXDIB_BLEND_NORMAL) override; |
| 110 FX_BOOL SetPixel(int x, | |
| 111 int y, | |
| 112 uint32_t color, | |
| 113 int alpha_flag = 0, | |
| 114 void* pIccTransform = NULL) override { | |
| 115 return FALSE; | |
| 116 } | |
| 117 FX_BOOL FillRect(const FX_RECT* pRect, | 107 FX_BOOL FillRect(const FX_RECT* pRect, |
| 118 uint32_t fill_color, | 108 uint32_t fill_color, |
| 119 int alpha_flag = 0, | 109 int alpha_flag = 0, |
| 120 void* pIccTransform = NULL, | 110 void* pIccTransform = NULL, |
| 121 int blend_type = FXDIB_BLEND_NORMAL) override; | 111 int blend_type = FXDIB_BLEND_NORMAL) override; |
| 122 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, | 112 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, |
| 123 FX_FLOAT y1, | 113 FX_FLOAT y1, |
| 124 FX_FLOAT x2, | 114 FX_FLOAT x2, |
| 125 FX_FLOAT y2, | 115 FX_FLOAT y2, |
| 126 uint32_t color, | 116 uint32_t color, |
| 127 int alpha_flag = 0, | 117 int alpha_flag = 0, |
| 128 void* pIccTransform = NULL, | 118 void* pIccTransform = NULL, |
| 129 int blend_type = FXDIB_BLEND_NORMAL) override; | 119 int blend_type = FXDIB_BLEND_NORMAL) override; |
| 130 FX_BOOL GetClipBox(FX_RECT* pRect) override; | 120 FX_BOOL GetClipBox(FX_RECT* pRect) override; |
| 131 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, | 121 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, |
| 132 int left, | 122 int left, |
| 133 int top, | 123 int top, |
| 134 void* pIccTransform = NULL, | 124 void* pIccTransform = NULL, |
| 135 FX_BOOL bDEdge = FALSE) override; | 125 FX_BOOL bDEdge = FALSE) override; |
| 136 CFX_DIBitmap* GetBackDrop() override { return NULL; } | |
| 137 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 126 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
| 138 uint32_t color, | 127 uint32_t color, |
| 139 const FX_RECT* pSrcRect, | 128 const FX_RECT* pSrcRect, |
| 140 int dest_left, | 129 int dest_left, |
| 141 int dest_top, | 130 int dest_top, |
| 142 int blend_type, | 131 int blend_type, |
| 143 int alpha_flag = 0, | 132 int alpha_flag = 0, |
| 144 void* pIccTransform = NULL) override; | 133 void* pIccTransform = NULL) override; |
| 145 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 134 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
| 146 uint32_t color, | 135 uint32_t color, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 157 int bitmap_alpha, | 146 int bitmap_alpha, |
| 158 uint32_t color, | 147 uint32_t color, |
| 159 const CFX_Matrix* pMatrix, | 148 const CFX_Matrix* pMatrix, |
| 160 uint32_t flags, | 149 uint32_t flags, |
| 161 void*& handle, | 150 void*& handle, |
| 162 int alpha_flag = 0, | 151 int alpha_flag = 0, |
| 163 void* pIccTransform = NULL, | 152 void* pIccTransform = NULL, |
| 164 int blend_type = FXDIB_BLEND_NORMAL) override { | 153 int blend_type = FXDIB_BLEND_NORMAL) override { |
| 165 return FALSE; | 154 return FALSE; |
| 166 } | 155 } |
| 167 FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) override { | |
| 168 return FALSE; | |
| 169 } | |
| 170 void CancelDIBits(void* handle) override {} | |
| 171 FX_BOOL DrawDeviceText(int nChars, | 156 FX_BOOL DrawDeviceText(int nChars, |
| 172 const FXTEXT_CHARPOS* pCharPos, | 157 const FXTEXT_CHARPOS* pCharPos, |
| 173 CFX_Font* pFont, | 158 CFX_Font* pFont, |
| 174 CFX_FontCache* pCache, | 159 CFX_FontCache* pCache, |
| 175 const CFX_Matrix* pObject2Device, | 160 const CFX_Matrix* pObject2Device, |
| 176 FX_FLOAT font_size, | 161 FX_FLOAT font_size, |
| 177 uint32_t color, | 162 uint32_t color, |
| 178 int alpha_flag = 0, | 163 int alpha_flag = 0, |
| 179 void* pIccTransform = NULL) override; | 164 void* pIccTransform = NULL) override; |
| 180 void* GetPlatformSurface() const override { return NULL; } | |
| 181 void ClearDriver() override; | 165 void ClearDriver() override; |
| 182 | 166 |
| 183 protected: | 167 protected: |
| 184 void setStrokeInfo(const CFX_GraphStateData* graphState, | 168 void setStrokeInfo(const CFX_GraphStateData* graphState, |
| 185 FX_ARGB argb, | 169 FX_ARGB argb, |
| 186 FX_FLOAT lineWidth); | 170 FX_FLOAT lineWidth); |
| 187 void setFillInfo(FX_ARGB argb); | 171 void setFillInfo(FX_ARGB argb); |
| 188 void setPathToContext(const CFX_PathData* pathData); | 172 void setPathToContext(const CFX_PathData* pathData); |
| 189 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState, | 173 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState, |
| 190 CGAffineTransform ctm); | 174 CGAffineTransform ctm); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 218 int32_t m_vertSize; | 202 int32_t m_vertSize; |
| 219 }; | 203 }; |
| 220 | 204 |
| 221 uint32_t FX_GetHashCode(const FX_CHAR* pStr); | 205 uint32_t FX_GetHashCode(const FX_CHAR* pStr); |
| 222 uint32_t FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName); | 206 uint32_t FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName); |
| 223 uint32_t FX_IOSGetFamilyNamesCount(); | 207 uint32_t FX_IOSGetFamilyNamesCount(); |
| 224 const FX_CHAR* FX_IOSGetFamilyName(uint32_t uIndex); | 208 const FX_CHAR* FX_IOSGetFamilyName(uint32_t uIndex); |
| 225 #endif | 209 #endif |
| 226 | 210 |
| 227 #endif // CORE_FXGE_APPLE_APPLE_INT_H_ | 211 #endif // CORE_FXGE_APPLE_APPLE_INT_H_ |
| OLD | NEW |