Chromium Code Reviews| 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..c77ca2331d10b1af0a1541a59e01c10848a97bf3 |
| --- /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 { 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.
|
| + |
| +class CFX_Shading { |
| + public: |
| + CFX_Shading(); |
| + 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(); |
| + |
| + int32_t 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_ |