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 | |
14 #define FX_SHADING_Steps 256 | |
15 | |
16 enum CFX_Shading_Type { FX_SHADING_Axial = 1, FX_SHADING_Radial }; | |
17 | |
18 class CFX_Shading { | |
19 public: | |
20 CFX_Shading(const CFX_PointF& beginPoint, | |
Tom Sepez
2016/03/16 20:53:18
add comment // Axial shading.
dsinclair
2016/03/16 21:13:40
Done.
| |
21 const CFX_PointF& endPoint, | |
22 FX_BOOL isExtendedBegin, | |
23 FX_BOOL isExtendedEnd, | |
24 const FX_ARGB beginArgb, | |
25 const FX_ARGB endArgb); | |
26 CFX_Shading(const CFX_PointF& beginPoint, | |
Tom Sepez
2016/03/16 20:53:18
add comment // Radial shading.
dsinclair
2016/03/16 21:13:40
Done.
| |
27 const CFX_PointF& endPoint, | |
28 const FX_FLOAT beginRadius, | |
29 const FX_FLOAT endRadius, | |
30 FX_BOOL isExtendedBegin, | |
31 FX_BOOL isExtendedEnd, | |
32 const FX_ARGB beginArgb, | |
33 const FX_ARGB endArgb); | |
34 virtual ~CFX_Shading(); | |
35 | |
36 private: | |
37 friend class CFX_Graphics; | |
38 | |
39 void InitArgbArray(); | |
40 | |
41 const CFX_Shading_Type m_type; | |
42 CFX_PointF m_beginPoint; | |
Tom Sepez
2016/03/16 20:53:18
any more of these consts?
dsinclair
2016/03/16 21:13:39
Done. And even found a bug.
| |
43 CFX_PointF m_endPoint; | |
44 FX_FLOAT m_beginRadius; | |
45 FX_FLOAT m_endRadius; | |
46 FX_BOOL m_isExtendedBegin; | |
47 FX_BOOL m_isExtendedEnd; | |
48 FX_ARGB m_beginArgb; | |
49 FX_ARGB m_endArgb; | |
50 FX_ARGB m_argbArray[FX_SHADING_Steps]; | |
51 }; | |
52 | |
53 #endif // XFA_FXGRAPHICS_CFX_SHADING_H_ | |
OLD | NEW |