| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 int fill_mode) override; | 94 int fill_mode) override; |
| 95 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, | 95 FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, |
| 96 const CFX_Matrix* pObject2Device, | 96 const CFX_Matrix* pObject2Device, |
| 97 const CFX_GraphStateData* pGraphState) override; | 97 const CFX_GraphStateData* pGraphState) override; |
| 98 FX_BOOL DrawPath(const CFX_PathData* pPathData, | 98 FX_BOOL DrawPath(const CFX_PathData* pPathData, |
| 99 const CFX_Matrix* pObject2Device, | 99 const CFX_Matrix* pObject2Device, |
| 100 const CFX_GraphStateData* pGraphState, | 100 const CFX_GraphStateData* pGraphState, |
| 101 uint32_t fill_color, | 101 uint32_t fill_color, |
| 102 uint32_t stroke_color, | 102 uint32_t stroke_color, |
| 103 int fill_mode, | 103 int fill_mode, |
| 104 int alpha_flag = 0, | 104 int blend_type) override; |
| 105 void* pIccTransform = nullptr, | 105 FX_BOOL FillRectWithBlend(const FX_RECT* pRect, |
| 106 int blend_type = FXDIB_BLEND_NORMAL) override; | 106 uint32_t fill_color, |
| 107 FX_BOOL FillRect(const FX_RECT* pRect, | 107 int blend_type) override; |
| 108 uint32_t fill_color, | |
| 109 int alpha_flag = 0, | |
| 110 void* pIccTransform = nullptr, | |
| 111 int blend_type = FXDIB_BLEND_NORMAL) override; | |
| 112 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, | 108 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, |
| 113 FX_FLOAT y1, | 109 FX_FLOAT y1, |
| 114 FX_FLOAT x2, | 110 FX_FLOAT x2, |
| 115 FX_FLOAT y2, | 111 FX_FLOAT y2, |
| 116 uint32_t color, | 112 uint32_t color, |
| 117 int alpha_flag = 0, | 113 int blend_type) override; |
| 118 void* pIccTransform = nullptr, | |
| 119 int blend_type = FXDIB_BLEND_NORMAL) override; | |
| 120 FX_BOOL GetClipBox(FX_RECT* pRect) override; | 114 FX_BOOL GetClipBox(FX_RECT* pRect) override; |
| 121 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, | 115 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) override; |
| 122 int left, | |
| 123 int top, | |
| 124 void* pIccTransform = nullptr, | |
| 125 FX_BOOL bDEdge = FALSE) override; | |
| 126 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, | 116 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, |
| 127 uint32_t color, | 117 uint32_t color, |
| 128 const FX_RECT* pSrcRect, | 118 const FX_RECT* pSrcRect, |
| 129 int dest_left, | 119 int dest_left, |
| 130 int dest_top, | 120 int dest_top, |
| 131 int blend_type, | 121 int blend_type) override; |
| 132 int alpha_flag = 0, | |
| 133 void* pIccTransform = nullptr) override; | |
| 134 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, | 122 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, |
| 135 uint32_t color, | 123 uint32_t color, |
| 136 int dest_left, | 124 int dest_left, |
| 137 int dest_top, | 125 int dest_top, |
| 138 int dest_width, | 126 int dest_width, |
| 139 int dest_height, | 127 int dest_height, |
| 140 const FX_RECT* pClipRect, | 128 const FX_RECT* pClipRect, |
| 141 uint32_t flags, | 129 uint32_t flags, |
| 142 int alpha_flag = 0, | 130 int blend_type) override; |
| 143 void* pIccTransform = nullptr, | |
| 144 int blend_type = FXDIB_BLEND_NORMAL) override; | |
| 145 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, | 131 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, |
| 146 int bitmap_alpha, | 132 int bitmap_alpha, |
| 147 uint32_t color, | 133 uint32_t color, |
| 148 const CFX_Matrix* pMatrix, | 134 const CFX_Matrix* pMatrix, |
| 149 uint32_t flags, | 135 uint32_t flags, |
| 150 void*& handle, | 136 void*& handle, |
| 151 int alpha_flag = 0, | 137 int blend_type) override { |
| 152 void* pIccTransform = nullptr, | |
| 153 int blend_type = FXDIB_BLEND_NORMAL) override { | |
| 154 return FALSE; | 138 return FALSE; |
| 155 } | 139 } |
| 156 FX_BOOL DrawDeviceText(int nChars, | 140 FX_BOOL DrawDeviceText(int nChars, |
| 157 const FXTEXT_CHARPOS* pCharPos, | 141 const FXTEXT_CHARPOS* pCharPos, |
| 158 CFX_Font* pFont, | 142 CFX_Font* pFont, |
| 159 CFX_FontCache* pCache, | 143 CFX_FontCache* pCache, |
| 160 const CFX_Matrix* pObject2Device, | 144 const CFX_Matrix* pObject2Device, |
| 161 FX_FLOAT font_size, | 145 FX_FLOAT font_size, |
| 162 uint32_t color, | 146 uint32_t color) override; |
| 163 int alpha_flag = 0, | |
| 164 void* pIccTransform = nullptr) override; | |
| 165 void ClearDriver() override; | 147 void ClearDriver() override; |
| 166 | 148 |
| 167 protected: | 149 protected: |
| 168 void setStrokeInfo(const CFX_GraphStateData* graphState, | 150 void setStrokeInfo(const CFX_GraphStateData* graphState, |
| 169 FX_ARGB argb, | 151 FX_ARGB argb, |
| 170 FX_FLOAT lineWidth); | 152 FX_FLOAT lineWidth); |
| 171 void setFillInfo(FX_ARGB argb); | 153 void setFillInfo(FX_ARGB argb); |
| 172 void setPathToContext(const CFX_PathData* pathData); | 154 void setPathToContext(const CFX_PathData* pathData); |
| 173 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState, | 155 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState, |
| 174 CGAffineTransform ctm); | 156 CGAffineTransform ctm); |
| 175 FX_BOOL CG_DrawGlypRun(int nChars, | 157 FX_BOOL CG_DrawGlyphRun(int nChars, |
| 176 const FXTEXT_CHARPOS* pCharPos, | 158 const FXTEXT_CHARPOS* pCharPos, |
| 177 CFX_Font* pFont, | 159 CFX_Font* pFont, |
| 178 CFX_FontCache* pCache, | 160 CFX_FontCache* pCache, |
| 179 const CFX_Matrix* pGlyphMatrix, | 161 const CFX_Matrix* pGlyphMatrix, |
| 180 const CFX_Matrix* pObject2Device, | 162 const CFX_Matrix* pObject2Device, |
| 181 FX_FLOAT font_size, | 163 FX_FLOAT font_size, |
| 182 uint32_t argb, | 164 uint32_t argb); |
| 183 int alpha_flag, | |
| 184 void* pIccTransform); | |
| 185 void CG_SetImageTransform(int dest_left, | 165 void CG_SetImageTransform(int dest_left, |
| 186 int dest_top, | 166 int dest_top, |
| 187 int dest_width, | 167 int dest_width, |
| 188 int dest_height, | 168 int dest_height, |
| 189 CGRect* rect = nullptr); | 169 CGRect* rect); |
| 190 | 170 |
| 191 CGContextRef m_context; | 171 CGContextRef m_context; |
| 192 CGAffineTransform m_foxitDevice2User; | 172 CGAffineTransform m_foxitDevice2User; |
| 193 CGAffineTransform m_user2FoxitDevice; | 173 CGAffineTransform m_user2FoxitDevice; |
| 194 int32_t m_saveCount; | 174 int32_t m_saveCount; |
| 195 | 175 |
| 196 int32_t m_width; | 176 int32_t m_width; |
| 197 int32_t m_height; | 177 int32_t m_height; |
| 198 int32_t m_bitsPerPixel; | 178 int32_t m_bitsPerPixel; |
| 199 int32_t m_deviceClass; | 179 int32_t m_deviceClass; |
| 200 int32_t m_renderCaps; | 180 int32_t m_renderCaps; |
| 201 int32_t m_horzSize; | 181 int32_t m_horzSize; |
| 202 int32_t m_vertSize; | 182 int32_t m_vertSize; |
| 203 }; | 183 }; |
| 204 | 184 |
| 205 uint32_t FX_GetHashCode(const FX_CHAR* pStr); | 185 uint32_t FX_GetHashCode(const FX_CHAR* pStr); |
| 206 uint32_t FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName); | 186 uint32_t FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName); |
| 207 uint32_t FX_IOSGetFamilyNamesCount(); | 187 uint32_t FX_IOSGetFamilyNamesCount(); |
| 208 const FX_CHAR* FX_IOSGetFamilyName(uint32_t uIndex); | 188 const FX_CHAR* FX_IOSGetFamilyName(uint32_t uIndex); |
| 209 #endif | 189 #endif |
| 210 | 190 |
| 211 #endif // CORE_FXGE_APPLE_APPLE_INT_H_ | 191 #endif // CORE_FXGE_APPLE_APPLE_INT_H_ |
| OLD | NEW |