OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_FXGRAPHICS_CFX_SHADING_H_ | |
8 #define XFA_FXGRAPHICS_CFX_SHADING_H_ | |
9 | |
10 #include "core/include/fxcrt/fx_coordinates.h" | |
11 #include "core/include/fxcrt/fx_system.h" | |
12 #include "core/include/fxge/fx_dib.h" | |
13 #include "xfa/fxgraphics/include/cfx_graphics.h" | |
14 | |
15 #define FX_SHADING_Steps 256 | |
16 | |
17 enum { FX_SHADING_None = 0, FX_SHADING_Axial, FX_SHADING_Radial }; | |
Tom Sepez
2016/03/16 17:08:52
ditto for type here.
dsinclair
2016/03/16 19:21:07
Done.
| |
18 | |
19 class CFX_Shading { | |
20 public: | |
21 CFX_Shading(); | |
22 virtual ~CFX_Shading(); | |
23 | |
24 FX_ERR CreateAxial(const CFX_PointF& beginPoint, | |
25 const CFX_PointF& endPoint, | |
26 FX_BOOL isExtendedBegin, | |
27 FX_BOOL isExtendedEnd, | |
28 const FX_ARGB beginArgb, | |
29 const FX_ARGB endArgb); | |
30 FX_ERR CreateRadial(const CFX_PointF& beginPoint, | |
31 const CFX_PointF& endPoint, | |
32 const FX_FLOAT beginRadius, | |
33 const FX_FLOAT endRadius, | |
34 FX_BOOL isExtendedBegin, | |
35 FX_BOOL isExtendedEnd, | |
36 const FX_ARGB beginArgb, | |
37 const FX_ARGB endArgb); | |
38 | |
39 private: | |
40 friend class CFX_Graphics; | |
41 | |
42 FX_ERR InitArgbArray(); | |
43 | |
44 int32_t m_type; | |
45 CFX_PointF m_beginPoint; | |
46 CFX_PointF m_endPoint; | |
47 FX_FLOAT m_beginRadius; | |
48 FX_FLOAT m_endRadius; | |
49 FX_BOOL m_isExtendedBegin; | |
50 FX_BOOL m_isExtendedEnd; | |
51 FX_ARGB m_beginArgb; | |
52 FX_ARGB m_endArgb; | |
53 FX_ARGB m_argbArray[FX_SHADING_Steps]; | |
54 }; | |
55 | |
56 #endif // XFA_FXGRAPHICS_CFX_SHADING_H_ | |
OLD | NEW |