Index: xfa/fxgraphics/cfx_shading.h |
diff --git a/xfa/fxgraphics/cfx_shading.h b/xfa/fxgraphics/cfx_shading.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fceb86931ceff1f10c8ff01028b2eb325cfbc433 |
--- /dev/null |
+++ b/xfa/fxgraphics/cfx_shading.h |
@@ -0,0 +1,56 @@ |
+// Copyright 2016 PDFium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
+ |
+#ifndef XFA_FXGRAPHICS_CFX_SHADING_H_ |
+#define XFA_FXGRAPHICS_CFX_SHADING_H_ |
+ |
+#include "core/include/fxcrt/fx_coordinates.h" |
+#include "core/include/fxcrt/fx_system.h" |
+#include "core/include/fxge/fx_dib.h" |
+#include "xfa/fxgraphics/include/cfx_graphics.h" |
+ |
+#define FX_SHADING_Steps 256 |
+ |
+enum CFX_Shading_Type { FX_SHADING_Axial = 1, FX_SHADING_Radial }; |
+ |
+class CFX_Shading { |
+ public: |
+ explicit CFX_Shading(CFX_Shading_Type type); |
Tom Sepez
2016/03/16 19:38:32
See previous comment about mismatch between this a
dsinclair
2016/03/16 19:59:16
Done.
|
+ virtual ~CFX_Shading(); |
+ |
+ FX_ERR CreateAxial(const CFX_PointF& beginPoint, |
+ const CFX_PointF& endPoint, |
+ FX_BOOL isExtendedBegin, |
+ FX_BOOL isExtendedEnd, |
+ const FX_ARGB beginArgb, |
+ const FX_ARGB endArgb); |
+ FX_ERR CreateRadial(const CFX_PointF& beginPoint, |
+ const CFX_PointF& endPoint, |
+ const FX_FLOAT beginRadius, |
+ const FX_FLOAT endRadius, |
+ FX_BOOL isExtendedBegin, |
+ FX_BOOL isExtendedEnd, |
+ const FX_ARGB beginArgb, |
+ const FX_ARGB endArgb); |
+ |
+ private: |
+ friend class CFX_Graphics; |
+ |
+ FX_ERR InitArgbArray(); |
+ |
+ const CFX_Shading_Type m_type; |
+ CFX_PointF m_beginPoint; |
+ CFX_PointF m_endPoint; |
+ FX_FLOAT m_beginRadius; |
+ FX_FLOAT m_endRadius; |
+ FX_BOOL m_isExtendedBegin; |
+ FX_BOOL m_isExtendedEnd; |
+ FX_ARGB m_beginArgb; |
+ FX_ARGB m_endArgb; |
+ FX_ARGB m_argbArray[FX_SHADING_Steps]; |
+}; |
+ |
+#endif // XFA_FXGRAPHICS_CFX_SHADING_H_ |