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

Side by Side Diff: xfa/include/fxgraphics/fx_graphics.h

Issue 1740223002: Replace or remove _FX control-flow defines (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Two manual changes. Created 4 years, 9 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
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 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"
11 11
12 typedef int FX_ERR; 12 typedef int FX_ERR;
13 #define FX_ERR_Succeeded 0 13 #define FX_ERR_Succeeded 0
14 #define FX_ERR_Indefinite -1 14 #define FX_ERR_Indefinite -1
15 #define FX_ERR_Parameter_Invalid -100 15 #define FX_ERR_Parameter_Invalid -100
16 #define FX_ERR_Property_Invalid -200 16 #define FX_ERR_Property_Invalid -200
17 #define FX_ERR_Intermediate_Value_Invalid -300 17 #define FX_ERR_Intermediate_Value_Invalid -300
18 #define FX_ERR_Method_Not_Supported -400 18 #define FX_ERR_Method_Not_Supported -400
19 #define FX_ERR_Out_Of_Memory -500 19 #define FX_ERR_Out_Of_Memory -500
20 #define _FX_RETURN_IF_FAIL(arg) \
21 { \
22 if (!(arg)) \
23 return; \
24 }
25 #define _FX_RETURN_VALUE_IF_FAIL(arg, val) \
26 { \
27 if (!(arg)) \
28 return val; \
29 }
30 #define _FX_GOTO_POSITION_IF_FAIL(arg, pos) \
31 { \
32 if (!(arg)) \
33 goto pos; \
34 }
35 #define _FX_ERR_CHECK_RETURN_IF_FAIL(arg) \
36 { \
37 if ((arg) != FX_ERR_Succeeded) \
38 return; \
39 }
40 #define _FX_ERR_CHECK_RETURN_VALUE_IF_FAIL(arg, val) \
41 { \
42 if ((arg) != FX_ERR_Succeeded) \
43 return val; \
44 }
45 #define _FX_ERR_CHECK_GOTO_POSITION_IF_FAIL(arg, pos) \
46 { \
47 if ((arg) != FX_ERR_Succeeded) \
48 goto pos; \
49 }
50 20
51 #define FX_SHADING_Steps 256 21 #define FX_SHADING_Steps 256
52 typedef int32_t FX_DashStyle; 22 typedef int32_t FX_DashStyle;
53 enum { 23 enum {
54 FX_DASHSTYLE_Solid = 0, 24 FX_DASHSTYLE_Solid = 0,
55 FX_DASHSTYLE_Dash = 1, 25 FX_DASHSTYLE_Dash = 1,
56 FX_DASHSTYLE_Dot = 2, 26 FX_DASHSTYLE_Dot = 2,
57 FX_DASHSTYLE_DashDot = 3, 27 FX_DASHSTYLE_DashDot = 3,
58 FX_DASHSTYLE_DashDotDot = 4 28 FX_DASHSTYLE_DashDotDot = 4
59 }; 29 };
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 FX_FLOAT _endRadius; 462 FX_FLOAT _endRadius;
493 FX_BOOL _isExtendedBegin; 463 FX_BOOL _isExtendedBegin;
494 FX_BOOL _isExtendedEnd; 464 FX_BOOL _isExtendedEnd;
495 FX_ARGB _beginArgb; 465 FX_ARGB _beginArgb;
496 FX_ARGB _endArgb; 466 FX_ARGB _endArgb;
497 FX_ARGB _argbArray[FX_SHADING_Steps]; 467 FX_ARGB _argbArray[FX_SHADING_Steps];
498 friend class CFX_Graphics; 468 friend class CFX_Graphics;
499 }; 469 };
500 470
501 #endif // XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_ 471 #endif // XFA_INCLUDE_FXGRAPHICS_FX_GRAPHICS_H_
OLDNEW
« no previous file with comments | « no previous file | xfa/src/fxfa/src/app/xfa_ffwidget.h » ('j') | xfa/src/fxgraphics/src/fx_graphics.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698