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 XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ | 7 #ifndef XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ |
8 #define XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ | 8 #define XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ |
9 | 9 |
10 #include "core/include/fpdfapi/fpdf_pageobj.h" | 10 #include "core/include/fpdfapi/fpdf_pageobj.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 CFX_Matrix* matrix = NULL); | 205 CFX_Matrix* matrix = NULL); |
206 | 206 |
207 FX_ERR DrawImage(CFX_DIBSource* source, | 207 FX_ERR DrawImage(CFX_DIBSource* source, |
208 const CFX_PointF& point, | 208 const CFX_PointF& point, |
209 CFX_Matrix* matrix = NULL); | 209 CFX_Matrix* matrix = NULL); |
210 | 210 |
211 FX_ERR StretchImage(CFX_DIBSource* source, | 211 FX_ERR StretchImage(CFX_DIBSource* source, |
212 const CFX_RectF& rect, | 212 const CFX_RectF& rect, |
213 CFX_Matrix* matrix = NULL); | 213 CFX_Matrix* matrix = NULL); |
214 | 214 |
215 FX_ERR ConcatMatrix(CFX_Matrix* matrix); | 215 FX_ERR ConcatMatrix(const CFX_Matrix* matrix); |
216 | 216 |
217 CFX_Matrix* GetMatrix(); | 217 CFX_Matrix* GetMatrix(); |
218 | 218 |
219 FX_ERR GetClipRect(CFX_RectF& rect); | 219 FX_ERR GetClipRect(CFX_RectF& rect); |
220 | 220 |
221 FX_ERR SetClipRect(const CFX_RectF& rect); | 221 FX_ERR SetClipRect(const CFX_RectF& rect); |
222 | 222 |
223 FX_ERR ClearClip(); | 223 FX_ERR ClearClip(); |
224 | 224 |
225 FX_ERR SetFont(CFX_Font* font); | 225 FX_ERR SetFont(CFX_Font* font); |
226 | 226 |
227 FX_ERR SetFontSize(const FX_FLOAT size); | 227 FX_ERR SetFontSize(const FX_FLOAT size); |
228 | 228 |
229 FX_ERR SetFontHScale(const FX_FLOAT scale); | 229 FX_ERR SetFontHScale(const FX_FLOAT scale); |
230 | 230 |
231 FX_ERR SetCharSpacing(const FX_FLOAT spacing); | 231 FX_ERR SetCharSpacing(const FX_FLOAT spacing); |
232 | 232 |
233 FX_ERR SetTextDrawingMode(const int32_t mode); | 233 FX_ERR SetTextDrawingMode(const int32_t mode); |
234 | 234 |
235 FX_ERR ShowText(const CFX_PointF& point, | 235 FX_ERR ShowText(const CFX_PointF& point, |
236 const CFX_WideString& text, | 236 const CFX_WideString& text, |
237 CFX_Matrix* matrix = NULL); | 237 CFX_Matrix* matrix = NULL); |
238 | 238 |
239 FX_ERR CalcTextRect(CFX_RectF& rect, | 239 FX_ERR CalcTextRect(CFX_RectF& rect, |
240 const CFX_WideString& text, | 240 const CFX_WideString& text, |
241 FX_BOOL isMultiline = FALSE, | 241 FX_BOOL isMultiline = FALSE, |
242 CFX_Matrix* matrix = NULL); | 242 CFX_Matrix* matrix = NULL); |
243 | 243 |
244 FX_ERR Transfer(CFX_Graphics* graphics, CFX_Matrix* matrix = NULL); | 244 FX_ERR Transfer(CFX_Graphics* graphics, const CFX_Matrix* matrix); |
245 | |
246 FX_ERR Transfer(CFX_Graphics* graphics, | 245 FX_ERR Transfer(CFX_Graphics* graphics, |
247 FX_FLOAT srcLeft, | 246 FX_FLOAT srcLeft, |
248 FX_FLOAT srcTop, | 247 FX_FLOAT srcTop, |
249 const CFX_RectF& dstRect, | 248 const CFX_RectF& dstRect, |
250 CFX_Matrix* matrix = NULL); | 249 const CFX_Matrix* matrix); |
251 | 250 |
252 CFX_RenderDevice* GetRenderDevice(); | 251 CFX_RenderDevice* GetRenderDevice(); |
253 | 252 |
254 FX_ERR InverseRect(const CFX_RectF& rect); | 253 FX_ERR InverseRect(const CFX_RectF& rect); |
255 FX_ERR XorDIBitmap(const CFX_DIBitmap* srcBitmap, const CFX_RectF& rect); | 254 FX_ERR XorDIBitmap(const CFX_DIBitmap* srcBitmap, const CFX_RectF& rect); |
256 FX_ERR EqvDIBitmap(const CFX_DIBitmap* srcBitmap, const CFX_RectF& rect); | 255 FX_ERR EqvDIBitmap(const CFX_DIBitmap* srcBitmap, const CFX_RectF& rect); |
257 | 256 |
258 private: | 257 private: |
259 FX_ERR RenderDeviceSetLineDash(FX_DashStyle dashStyle); | 258 FX_ERR RenderDeviceSetLineDash(FX_DashStyle dashStyle); |
260 | 259 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 FX_FLOAT _endRadius; | 492 FX_FLOAT _endRadius; |
494 FX_BOOL _isExtendedBegin; | 493 FX_BOOL _isExtendedBegin; |
495 FX_BOOL _isExtendedEnd; | 494 FX_BOOL _isExtendedEnd; |
496 FX_ARGB _beginArgb; | 495 FX_ARGB _beginArgb; |
497 FX_ARGB _endArgb; | 496 FX_ARGB _endArgb; |
498 FX_ARGB _argbArray[FX_SHADING_Steps]; | 497 FX_ARGB _argbArray[FX_SHADING_Steps]; |
499 friend class CFX_Graphics; | 498 friend class CFX_Graphics; |
500 }; | 499 }; |
501 | 500 |
502 #endif // XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ | 501 #endif // XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ |
OLD | NEW |