Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: core/fxge/apple/apple_int.h

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix a bad merge Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fxge/android/fx_android_font.cpp ('k') | core/fxge/apple/fx_apple_platform.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize); 59 void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize);
60 void DestroyFont(void* pFont); 60 void DestroyFont(void* pFont);
61 void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix); 61 void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix);
62 FX_BOOL drawGraphicsString(void* graphics, 62 FX_BOOL drawGraphicsString(void* graphics,
63 void* font, 63 void* font,
64 FX_FLOAT fontSize, 64 FX_FLOAT fontSize,
65 uint16_t* glyphIndices, 65 uint16_t* glyphIndices,
66 CGPoint* glyphPositions, 66 CGPoint* glyphPositions,
67 int32_t chars, 67 int32_t chars,
68 FX_ARGB argb, 68 FX_ARGB argb,
69 CFX_Matrix* matrix = NULL); 69 CFX_Matrix* matrix = nullptr);
70 void saveGraphicsState(void* graphics); 70 void saveGraphicsState(void* graphics);
71 void restoreGraphicsState(void* graphics); 71 void restoreGraphicsState(void* graphics);
72 }; 72 };
73 73
74 class CApplePlatform { 74 class CApplePlatform {
75 public: 75 public:
76 CApplePlatform() {} 76 CApplePlatform() {}
77 ~CApplePlatform() {} 77 ~CApplePlatform() {}
78 78
79 CQuartz2D m_quartz2d; 79 CQuartz2D m_quartz2d;
(...skipping 15 matching lines...) Expand all
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 alpha_flag = 0,
105 void* pIccTransform = NULL, 105 void* pIccTransform = nullptr,
106 int blend_type = FXDIB_BLEND_NORMAL) override; 106 int blend_type = FXDIB_BLEND_NORMAL) override;
107 FX_BOOL FillRect(const FX_RECT* pRect, 107 FX_BOOL FillRect(const FX_RECT* pRect,
108 uint32_t fill_color, 108 uint32_t fill_color,
109 int alpha_flag = 0, 109 int alpha_flag = 0,
110 void* pIccTransform = NULL, 110 void* pIccTransform = nullptr,
111 int blend_type = FXDIB_BLEND_NORMAL) override; 111 int blend_type = FXDIB_BLEND_NORMAL) override;
112 FX_BOOL DrawCosmeticLine(FX_FLOAT x1, 112 FX_BOOL DrawCosmeticLine(FX_FLOAT x1,
113 FX_FLOAT y1, 113 FX_FLOAT y1,
114 FX_FLOAT x2, 114 FX_FLOAT x2,
115 FX_FLOAT y2, 115 FX_FLOAT y2,
116 uint32_t color, 116 uint32_t color,
117 int alpha_flag = 0, 117 int alpha_flag = 0,
118 void* pIccTransform = NULL, 118 void* pIccTransform = nullptr,
119 int blend_type = FXDIB_BLEND_NORMAL) override; 119 int blend_type = FXDIB_BLEND_NORMAL) override;
120 FX_BOOL GetClipBox(FX_RECT* pRect) override; 120 FX_BOOL GetClipBox(FX_RECT* pRect) override;
121 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, 121 FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap,
122 int left, 122 int left,
123 int top, 123 int top,
124 void* pIccTransform = NULL, 124 void* pIccTransform = nullptr,
125 FX_BOOL bDEdge = FALSE) override; 125 FX_BOOL bDEdge = FALSE) override;
126 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, 126 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap,
127 uint32_t color, 127 uint32_t color,
128 const FX_RECT* pSrcRect, 128 const FX_RECT* pSrcRect,
129 int dest_left, 129 int dest_left,
130 int dest_top, 130 int dest_top,
131 int blend_type, 131 int blend_type,
132 int alpha_flag = 0, 132 int alpha_flag = 0,
133 void* pIccTransform = NULL) override; 133 void* pIccTransform = nullptr) override;
134 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, 134 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap,
135 uint32_t color, 135 uint32_t color,
136 int dest_left, 136 int dest_left,
137 int dest_top, 137 int dest_top,
138 int dest_width, 138 int dest_width,
139 int dest_height, 139 int dest_height,
140 const FX_RECT* pClipRect, 140 const FX_RECT* pClipRect,
141 uint32_t flags, 141 uint32_t flags,
142 int alpha_flag = 0, 142 int alpha_flag = 0,
143 void* pIccTransform = NULL, 143 void* pIccTransform = nullptr,
144 int blend_type = FXDIB_BLEND_NORMAL) override; 144 int blend_type = FXDIB_BLEND_NORMAL) override;
145 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, 145 FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
146 int bitmap_alpha, 146 int bitmap_alpha,
147 uint32_t color, 147 uint32_t color,
148 const CFX_Matrix* pMatrix, 148 const CFX_Matrix* pMatrix,
149 uint32_t flags, 149 uint32_t flags,
150 void*& handle, 150 void*& handle,
151 int alpha_flag = 0, 151 int alpha_flag = 0,
152 void* pIccTransform = NULL, 152 void* pIccTransform = nullptr,
153 int blend_type = FXDIB_BLEND_NORMAL) override { 153 int blend_type = FXDIB_BLEND_NORMAL) override {
154 return FALSE; 154 return FALSE;
155 } 155 }
156 FX_BOOL DrawDeviceText(int nChars, 156 FX_BOOL DrawDeviceText(int nChars,
157 const FXTEXT_CHARPOS* pCharPos, 157 const FXTEXT_CHARPOS* pCharPos,
158 CFX_Font* pFont, 158 CFX_Font* pFont,
159 CFX_FontCache* pCache, 159 CFX_FontCache* pCache,
160 const CFX_Matrix* pObject2Device, 160 const CFX_Matrix* pObject2Device,
161 FX_FLOAT font_size, 161 FX_FLOAT font_size,
162 uint32_t color, 162 uint32_t color,
163 int alpha_flag = 0, 163 int alpha_flag = 0,
164 void* pIccTransform = NULL) override; 164 void* pIccTransform = nullptr) override;
165 void ClearDriver() override; 165 void ClearDriver() override;
166 166
167 protected: 167 protected:
168 void setStrokeInfo(const CFX_GraphStateData* graphState, 168 void setStrokeInfo(const CFX_GraphStateData* graphState,
169 FX_ARGB argb, 169 FX_ARGB argb,
170 FX_FLOAT lineWidth); 170 FX_FLOAT lineWidth);
171 void setFillInfo(FX_ARGB argb); 171 void setFillInfo(FX_ARGB argb);
172 void setPathToContext(const CFX_PathData* pathData); 172 void setPathToContext(const CFX_PathData* pathData);
173 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState, 173 FX_FLOAT getLineWidth(const CFX_GraphStateData* graphState,
174 CGAffineTransform ctm); 174 CGAffineTransform ctm);
175 FX_BOOL CG_DrawGlypRun(int nChars, 175 FX_BOOL CG_DrawGlypRun(int nChars,
176 const FXTEXT_CHARPOS* pCharPos, 176 const FXTEXT_CHARPOS* pCharPos,
177 CFX_Font* pFont, 177 CFX_Font* pFont,
178 CFX_FontCache* pCache, 178 CFX_FontCache* pCache,
179 const CFX_Matrix* pGlyphMatrix, 179 const CFX_Matrix* pGlyphMatrix,
180 const CFX_Matrix* pObject2Device, 180 const CFX_Matrix* pObject2Device,
181 FX_FLOAT font_size, 181 FX_FLOAT font_size,
182 uint32_t argb, 182 uint32_t argb,
183 int alpha_flag, 183 int alpha_flag,
184 void* pIccTransform); 184 void* pIccTransform);
185 void CG_SetImageTransform(int dest_left, 185 void CG_SetImageTransform(int dest_left,
186 int dest_top, 186 int dest_top,
187 int dest_width, 187 int dest_width,
188 int dest_height, 188 int dest_height,
189 CGRect* rect = NULL); 189 CGRect* rect = nullptr);
190 190
191 CGContextRef m_context; 191 CGContextRef m_context;
192 CGAffineTransform m_foxitDevice2User; 192 CGAffineTransform m_foxitDevice2User;
193 CGAffineTransform m_user2FoxitDevice; 193 CGAffineTransform m_user2FoxitDevice;
194 int32_t m_saveCount; 194 int32_t m_saveCount;
195 195
196 int32_t m_width; 196 int32_t m_width;
197 int32_t m_height; 197 int32_t m_height;
198 int32_t m_bitsPerPixel; 198 int32_t m_bitsPerPixel;
199 int32_t m_deviceClass; 199 int32_t m_deviceClass;
200 int32_t m_renderCaps; 200 int32_t m_renderCaps;
201 int32_t m_horzSize; 201 int32_t m_horzSize;
202 int32_t m_vertSize; 202 int32_t m_vertSize;
203 }; 203 };
204 204
205 uint32_t FX_GetHashCode(const FX_CHAR* pStr); 205 uint32_t FX_GetHashCode(const FX_CHAR* pStr);
206 uint32_t FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName); 206 uint32_t FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName);
207 uint32_t FX_IOSGetFamilyNamesCount(); 207 uint32_t FX_IOSGetFamilyNamesCount();
208 const FX_CHAR* FX_IOSGetFamilyName(uint32_t uIndex); 208 const FX_CHAR* FX_IOSGetFamilyName(uint32_t uIndex);
209 #endif 209 #endif
210 210
211 #endif // CORE_FXGE_APPLE_APPLE_INT_H_ 211 #endif // CORE_FXGE_APPLE_APPLE_INT_H_
OLDNEW
« no previous file with comments | « core/fxge/android/fx_android_font.cpp ('k') | core/fxge/apple/fx_apple_platform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698