From 5a423ef8708e61d43f1556ab09c2e09f496d700d Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 14 Nov 2017 18:56:54 +0000 Subject: Rename the fxgraphics classes The build system doesn't like name clashes over directories in XFA. The Pattern and and Shading classes need to be renamed to not clash with future XFA node class names. Change-Id: I978da492d884626c0db2e11ac236a3399e9c7e58 Reviewed-on: https://pdfium-review.googlesource.com/18290 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- xfa/fxgraphics/cxfa_color.cpp | 46 ------------ xfa/fxgraphics/cxfa_color.h | 50 ------------- xfa/fxgraphics/cxfa_gecolor.cpp | 47 ++++++++++++ xfa/fxgraphics/cxfa_gecolor.h | 50 +++++++++++++ xfa/fxgraphics/cxfa_gepath.cpp | 151 ++++++++++++++++++++++++++++++++++++++ xfa/fxgraphics/cxfa_gepath.h | 55 ++++++++++++++ xfa/fxgraphics/cxfa_gepattern.cpp | 20 +++++ xfa/fxgraphics/cxfa_gepattern.h | 36 +++++++++ xfa/fxgraphics/cxfa_geshading.cpp | 78 ++++++++++++++++++++ xfa/fxgraphics/cxfa_geshading.h | 56 ++++++++++++++ xfa/fxgraphics/cxfa_graphics.cpp | 34 ++++----- xfa/fxgraphics/cxfa_graphics.h | 25 ++++--- xfa/fxgraphics/cxfa_path.cpp | 148 ------------------------------------- xfa/fxgraphics/cxfa_path.h | 55 -------------- xfa/fxgraphics/cxfa_pattern.cpp | 20 ----- xfa/fxgraphics/cxfa_pattern.h | 36 --------- xfa/fxgraphics/cxfa_shading.cpp | 78 -------------------- xfa/fxgraphics/cxfa_shading.h | 56 -------------- 18 files changed, 523 insertions(+), 518 deletions(-) delete mode 100644 xfa/fxgraphics/cxfa_color.cpp delete mode 100644 xfa/fxgraphics/cxfa_color.h create mode 100644 xfa/fxgraphics/cxfa_gecolor.cpp create mode 100644 xfa/fxgraphics/cxfa_gecolor.h create mode 100644 xfa/fxgraphics/cxfa_gepath.cpp create mode 100644 xfa/fxgraphics/cxfa_gepath.h create mode 100644 xfa/fxgraphics/cxfa_gepattern.cpp create mode 100644 xfa/fxgraphics/cxfa_gepattern.h create mode 100644 xfa/fxgraphics/cxfa_geshading.cpp create mode 100644 xfa/fxgraphics/cxfa_geshading.h delete mode 100644 xfa/fxgraphics/cxfa_path.cpp delete mode 100644 xfa/fxgraphics/cxfa_path.h delete mode 100644 xfa/fxgraphics/cxfa_pattern.cpp delete mode 100644 xfa/fxgraphics/cxfa_pattern.h delete mode 100644 xfa/fxgraphics/cxfa_shading.cpp delete mode 100644 xfa/fxgraphics/cxfa_shading.h (limited to 'xfa/fxgraphics') diff --git a/xfa/fxgraphics/cxfa_color.cpp b/xfa/fxgraphics/cxfa_color.cpp deleted file mode 100644 index 731d144c41..0000000000 --- a/xfa/fxgraphics/cxfa_color.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// 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 - -#include "xfa/fxgraphics/cxfa_color.h" - -CXFA_Color::CXFA_Color() : m_type(Invalid) {} - -CXFA_Color::CXFA_Color(const FX_ARGB argb) : m_type(Solid), m_argb(argb) { - m_pointer.pattern = nullptr; -} - -CXFA_Color::CXFA_Color(CXFA_Pattern* pattern, const FX_ARGB argb) - : m_type(Pattern), m_argb(argb) { - m_pointer.pattern = pattern; -} - -CXFA_Color::CXFA_Color(CXFA_Shading* shading) : m_type(Shading), m_argb(0) { - m_pointer.shading = shading; -} - -CXFA_Color::~CXFA_Color() {} - -CXFA_Color& CXFA_Color::operator=(const CXFA_Color& that) { - if (this != &that) { - m_type = that.m_type; - switch (m_type) { - case Solid: - m_argb = that.m_argb; - m_pointer.pattern = nullptr; - break; - case Pattern: - m_argb = that.m_argb; - m_pointer.pattern = that.m_pointer.pattern; - break; - case Shading: - m_argb = 0; - m_pointer.shading = that.m_pointer.shading; - default: - break; - } - } - return *this; -} diff --git a/xfa/fxgraphics/cxfa_color.h b/xfa/fxgraphics/cxfa_color.h deleted file mode 100644 index 4ae790507b..0000000000 --- a/xfa/fxgraphics/cxfa_color.h +++ /dev/null @@ -1,50 +0,0 @@ -// 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_CXFA_COLOR_H_ -#define XFA_FXGRAPHICS_CXFA_COLOR_H_ - -#include "core/fxge/fx_dib.h" - -class CXFA_Pattern; -class CXFA_Shading; - -class CXFA_Color { - public: - enum Type { Invalid, Solid, Pattern, Shading }; - - CXFA_Color(); - explicit CXFA_Color(const FX_ARGB argb); - explicit CXFA_Color(CXFA_Shading* shading); - CXFA_Color(CXFA_Pattern* pattern, const FX_ARGB argb); - ~CXFA_Color(); - - Type GetType() const { return m_type; } - FX_ARGB GetArgb() const { - ASSERT(m_type == Solid || m_type == Pattern); - return m_argb; - } - CXFA_Pattern* GetPattern() const { - ASSERT(m_type == Pattern); - return m_pointer.pattern; - } - CXFA_Shading* GetShading() const { - ASSERT(m_type == Shading); - return m_pointer.shading; - } - - CXFA_Color& operator=(const CXFA_Color& that); - - private: - Type m_type; - FX_ARGB m_argb; - union { - CXFA_Pattern* pattern; - CXFA_Shading* shading; - } m_pointer; -}; - -#endif // XFA_FXGRAPHICS_CXFA_COLOR_H_ diff --git a/xfa/fxgraphics/cxfa_gecolor.cpp b/xfa/fxgraphics/cxfa_gecolor.cpp new file mode 100644 index 0000000000..3dca4a7df5 --- /dev/null +++ b/xfa/fxgraphics/cxfa_gecolor.cpp @@ -0,0 +1,47 @@ +// 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 + +#include "xfa/fxgraphics/cxfa_gecolor.h" + +CXFA_GEColor::CXFA_GEColor() : m_type(Invalid) {} + +CXFA_GEColor::CXFA_GEColor(const FX_ARGB argb) : m_type(Solid), m_argb(argb) { + m_pointer.pattern = nullptr; +} + +CXFA_GEColor::CXFA_GEColor(CXFA_GEPattern* pattern, const FX_ARGB argb) + : m_type(Pattern), m_argb(argb) { + m_pointer.pattern = pattern; +} + +CXFA_GEColor::CXFA_GEColor(CXFA_GEShading* shading) + : m_type(Shading), m_argb(0) { + m_pointer.shading = shading; +} + +CXFA_GEColor::~CXFA_GEColor() {} + +CXFA_GEColor& CXFA_GEColor::operator=(const CXFA_GEColor& that) { + if (this != &that) { + m_type = that.m_type; + switch (m_type) { + case Solid: + m_argb = that.m_argb; + m_pointer.pattern = nullptr; + break; + case Pattern: + m_argb = that.m_argb; + m_pointer.pattern = that.m_pointer.pattern; + break; + case Shading: + m_argb = 0; + m_pointer.shading = that.m_pointer.shading; + default: + break; + } + } + return *this; +} diff --git a/xfa/fxgraphics/cxfa_gecolor.h b/xfa/fxgraphics/cxfa_gecolor.h new file mode 100644 index 0000000000..b60585b7a4 --- /dev/null +++ b/xfa/fxgraphics/cxfa_gecolor.h @@ -0,0 +1,50 @@ +// 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_CXFA_GECOLOR_H_ +#define XFA_FXGRAPHICS_CXFA_GECOLOR_H_ + +#include "core/fxge/fx_dib.h" + +class CXFA_GEPattern; +class CXFA_GEShading; + +class CXFA_GEColor { + public: + enum Type { Invalid, Solid, Pattern, Shading }; + + CXFA_GEColor(); + explicit CXFA_GEColor(const FX_ARGB argb); + explicit CXFA_GEColor(CXFA_GEShading* shading); + CXFA_GEColor(CXFA_GEPattern* pattern, const FX_ARGB argb); + ~CXFA_GEColor(); + + Type GetType() const { return m_type; } + FX_ARGB GetArgb() const { + ASSERT(m_type == Solid || m_type == Pattern); + return m_argb; + } + CXFA_GEPattern* GetPattern() const { + ASSERT(m_type == Pattern); + return m_pointer.pattern; + } + CXFA_GEShading* GetShading() const { + ASSERT(m_type == Shading); + return m_pointer.shading; + } + + CXFA_GEColor& operator=(const CXFA_GEColor& that); + + private: + Type m_type; + FX_ARGB m_argb; + union { + CXFA_GEPattern* pattern; + CXFA_GEShading* shading; + } m_pointer; +}; + +#endif // XFA_FXGRAPHICS_CXFA_GECOLOR_H_ diff --git a/xfa/fxgraphics/cxfa_gepath.cpp b/xfa/fxgraphics/cxfa_gepath.cpp new file mode 100644 index 0000000000..88372f72ac --- /dev/null +++ b/xfa/fxgraphics/cxfa_gepath.cpp @@ -0,0 +1,151 @@ +// 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 + +#include "xfa/fxgraphics/cxfa_gepath.h" + +#include "core/fxge/cfx_pathdata.h" +#include "third_party/base/ptr_util.h" + +CXFA_GEPath::CXFA_GEPath() {} + +CXFA_GEPath::~CXFA_GEPath() {} + +void CXFA_GEPath::Clear() { + data_.Clear(); +} + +void CXFA_GEPath::Close() { + data_.ClosePath(); +} + +void CXFA_GEPath::MoveTo(const CFX_PointF& point) { + data_.AppendPoint(point, FXPT_TYPE::MoveTo, false); +} + +void CXFA_GEPath::LineTo(const CFX_PointF& point) { + data_.AppendPoint(point, FXPT_TYPE::LineTo, false); +} + +void CXFA_GEPath::BezierTo(const CFX_PointF& c1, + const CFX_PointF& c2, + const CFX_PointF& to) { + data_.AppendPoint(c1, FXPT_TYPE::BezierTo, false); + data_.AppendPoint(c2, FXPT_TYPE::BezierTo, false); + data_.AppendPoint(to, FXPT_TYPE::BezierTo, false); +} + +void CXFA_GEPath::ArcTo(const CFX_PointF& pos, + const CFX_SizeF& size, + float start_angle, + float sweep_angle) { + CFX_SizeF new_size = size / 2.0f; + ArcToInternal(CFX_PointF(pos.x + new_size.width, pos.y + new_size.height), + new_size, start_angle, sweep_angle); +} + +void CXFA_GEPath::ArcToInternal(const CFX_PointF& pos, + const CFX_SizeF& size, + float start_angle, + float sweep_angle) { + float x0 = cos(sweep_angle / 2); + float y0 = sin(sweep_angle / 2); + float tx = ((1.0f - x0) * 4) / (3 * 1.0f); + float ty = y0 - ((tx * x0) / y0); + + CFX_PointF points[] = {CFX_PointF(x0 + tx, -ty), CFX_PointF(x0 + tx, ty)}; + float sn = sin(start_angle + sweep_angle / 2); + float cs = cos(start_angle + sweep_angle / 2); + + CFX_PointF bezier; + bezier.x = pos.x + (size.width * ((points[0].x * cs) - (points[0].y * sn))); + bezier.y = pos.y + (size.height * ((points[0].x * sn) + (points[0].y * cs))); + data_.AppendPoint(bezier, FXPT_TYPE::BezierTo, false); + + bezier.x = pos.x + (size.width * ((points[1].x * cs) - (points[1].y * sn))); + bezier.y = pos.y + (size.height * ((points[1].x * sn) + (points[1].y * cs))); + data_.AppendPoint(bezier, FXPT_TYPE::BezierTo, false); + + bezier.x = pos.x + (size.width * cos(start_angle + sweep_angle)); + bezier.y = pos.y + (size.height * sin(start_angle + sweep_angle)); + data_.AppendPoint(bezier, FXPT_TYPE::BezierTo, false); +} + +void CXFA_GEPath::AddLine(const CFX_PointF& p1, const CFX_PointF& p2) { + data_.AppendPoint(p1, FXPT_TYPE::MoveTo, false); + data_.AppendPoint(p2, FXPT_TYPE::LineTo, false); +} + +void CXFA_GEPath::AddRectangle(float left, + float top, + float width, + float height) { + data_.AppendRect(left, top, left + width, top + height); +} + +void CXFA_GEPath::AddEllipse(const CFX_RectF& rect) { + AddArc(rect.TopLeft(), rect.Size(), 0, FX_PI * 2); +} + +void CXFA_GEPath::AddArc(const CFX_PointF& original_pos, + const CFX_SizeF& original_size, + float start_angle, + float sweep_angle) { + if (sweep_angle == 0) + return; + + const float bezier_arc_angle_epsilon = 0.01f; + while (start_angle > FX_PI * 2) + start_angle -= FX_PI * 2; + while (start_angle < 0) + start_angle += FX_PI * 2; + if (sweep_angle >= FX_PI * 2) + sweep_angle = FX_PI * 2; + if (sweep_angle <= -FX_PI * 2) + sweep_angle = -FX_PI * 2; + + CFX_SizeF size = original_size / 2; + CFX_PointF pos(original_pos.x + size.width, original_pos.y + size.height); + data_.AppendPoint(pos + CFX_PointF(size.width * cos(start_angle), + size.height * sin(start_angle)), + FXPT_TYPE::MoveTo, false); + + float total_sweep = 0; + float local_sweep = 0; + float prev_sweep = 0; + bool done = false; + do { + if (sweep_angle < 0) { + prev_sweep = total_sweep; + local_sweep = -FX_PI / 2; + total_sweep -= FX_PI / 2; + if (total_sweep <= sweep_angle + bezier_arc_angle_epsilon) { + local_sweep = sweep_angle - prev_sweep; + done = true; + } + } else { + prev_sweep = total_sweep; + local_sweep = FX_PI / 2; + total_sweep += FX_PI / 2; + if (total_sweep >= sweep_angle - bezier_arc_angle_epsilon) { + local_sweep = sweep_angle - prev_sweep; + done = true; + } + } + + ArcToInternal(pos, size, start_angle, local_sweep); + start_angle += local_sweep; + } while (!done); +} + +void CXFA_GEPath::AddSubpath(CXFA_GEPath* path) { + if (!path) + return; + data_.Append(&path->data_, nullptr); +} + +void CXFA_GEPath::TransformBy(const CFX_Matrix& mt) { + data_.Transform(&mt); +} diff --git a/xfa/fxgraphics/cxfa_gepath.h b/xfa/fxgraphics/cxfa_gepath.h new file mode 100644 index 0000000000..0c3afc4edf --- /dev/null +++ b/xfa/fxgraphics/cxfa_gepath.h @@ -0,0 +1,55 @@ +// 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_CXFA_GEPATH_H_ +#define XFA_FXGRAPHICS_CXFA_GEPATH_H_ + +#include "core/fxcrt/fx_system.h" +#include "core/fxge/cfx_pathdata.h" +#include "xfa/fxgraphics/cxfa_graphics.h" + +class CXFA_GEPath final { + public: + CXFA_GEPath(); + ~CXFA_GEPath(); + + const CFX_PathData* GetPathData() const { return &data_; } + + void Clear(); + bool IsEmpty() const { return data_.GetPoints().empty(); } + void TransformBy(const CFX_Matrix& mt); + + void Close(); + void MoveTo(const CFX_PointF& point); + void LineTo(const CFX_PointF& point); + void BezierTo(const CFX_PointF& c1, + const CFX_PointF& c2, + const CFX_PointF& to); + void ArcTo(const CFX_PointF& pos, + const CFX_SizeF& size, + float startAngle, + float sweepAngle); + + void AddLine(const CFX_PointF& p1, const CFX_PointF& p2); + void AddRectangle(float left, float top, float width, float height); + void AddEllipse(const CFX_RectF& rect); + void AddArc(const CFX_PointF& pos, + const CFX_SizeF& size, + float startAngle, + float sweepAngle); + + void AddSubpath(CXFA_GEPath* path); + + private: + void ArcToInternal(const CFX_PointF& pos, + const CFX_SizeF& size, + float start_angle, + float sweep_angle); + + CFX_PathData data_; +}; + +#endif // XFA_FXGRAPHICS_CXFA_GEPATH_H_ diff --git a/xfa/fxgraphics/cxfa_gepattern.cpp b/xfa/fxgraphics/cxfa_gepattern.cpp new file mode 100644 index 0000000000..2a6a0e4934 --- /dev/null +++ b/xfa/fxgraphics/cxfa_gepattern.cpp @@ -0,0 +1,20 @@ +// 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 + +#include "xfa/fxgraphics/cxfa_gepattern.h" + +CXFA_GEPattern::CXFA_GEPattern(FX_HatchStyle hatchStyle, + const FX_ARGB foreArgb, + const FX_ARGB backArgb, + CFX_Matrix* matrix) + : m_hatchStyle(hatchStyle), m_foreArgb(foreArgb), m_backArgb(backArgb) { + if (matrix) + m_matrix = *matrix; + else + m_matrix.SetIdentity(); +} + +CXFA_GEPattern::~CXFA_GEPattern() {} diff --git a/xfa/fxgraphics/cxfa_gepattern.h b/xfa/fxgraphics/cxfa_gepattern.h new file mode 100644 index 0000000000..0f4ced20ea --- /dev/null +++ b/xfa/fxgraphics/cxfa_gepattern.h @@ -0,0 +1,36 @@ +// 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_CXFA_GEPATTERN_H_ +#define XFA_FXGRAPHICS_CXFA_GEPATTERN_H_ + +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" +#include "xfa/fxgraphics/cxfa_graphics.h" + +class CFX_DIBitmap; +class CFX_Matrix; + +class CXFA_GEPattern { + public: + CXFA_GEPattern(FX_HatchStyle hatchStyle, + const FX_ARGB foreArgb, + const FX_ARGB backArgb, + CFX_Matrix* matrix = nullptr); + + virtual ~CXFA_GEPattern(); + + private: + friend class CXFA_Graphics; + + CFX_Matrix m_matrix; + + const FX_HatchStyle m_hatchStyle; + const FX_ARGB m_foreArgb; + const FX_ARGB m_backArgb; +}; + +#endif // XFA_FXGRAPHICS_CXFA_GEPATTERN_H_ diff --git a/xfa/fxgraphics/cxfa_geshading.cpp b/xfa/fxgraphics/cxfa_geshading.cpp new file mode 100644 index 0000000000..f6911696a1 --- /dev/null +++ b/xfa/fxgraphics/cxfa_geshading.cpp @@ -0,0 +1,78 @@ +// 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 + +#include "xfa/fxgraphics/cxfa_geshading.h" + +CXFA_GEShading::CXFA_GEShading(const CFX_PointF& beginPoint, + const CFX_PointF& endPoint, + bool isExtendedBegin, + bool isExtendedEnd, + const FX_ARGB beginArgb, + const FX_ARGB endArgb) + : m_type(FX_SHADING_Axial), + m_beginPoint(beginPoint), + m_endPoint(endPoint), + m_beginRadius(0), + m_endRadius(0), + m_isExtendedBegin(isExtendedBegin), + m_isExtendedEnd(isExtendedEnd), + m_beginArgb(beginArgb), + m_endArgb(endArgb) { + InitArgbArray(); +} + +CXFA_GEShading::CXFA_GEShading(const CFX_PointF& beginPoint, + const CFX_PointF& endPoint, + const float beginRadius, + const float endRadius, + bool isExtendedBegin, + bool isExtendedEnd, + const FX_ARGB beginArgb, + const FX_ARGB endArgb) + : m_type(FX_SHADING_Radial), + m_beginPoint(beginPoint), + m_endPoint(endPoint), + m_beginRadius(beginRadius), + m_endRadius(endRadius), + m_isExtendedBegin(isExtendedBegin), + m_isExtendedEnd(isExtendedEnd), + m_beginArgb(beginArgb), + m_endArgb(endArgb) { + InitArgbArray(); +} + +CXFA_GEShading::~CXFA_GEShading() {} + +void CXFA_GEShading::InitArgbArray() { + int32_t a1; + int32_t r1; + int32_t g1; + int32_t b1; + std::tie(a1, r1, g1, b1) = ArgbDecode(m_beginArgb); + + int32_t a2; + int32_t r2; + int32_t g2; + int32_t b2; + std::tie(a2, r2, g2, b2) = ArgbDecode(m_endArgb); + + float f = static_cast(FX_SHADING_Steps - 1); + float aScale = 1.0 * (a2 - a1) / f; + float rScale = 1.0 * (r2 - r1) / f; + float gScale = 1.0 * (g2 - g1) / f; + float bScale = 1.0 * (b2 - b1) / f; + + for (int32_t i = 0; i < FX_SHADING_Steps; i++) { + int32_t a3 = static_cast(i * aScale); + int32_t r3 = static_cast(i * rScale); + int32_t g3 = static_cast(i * gScale); + int32_t b3 = static_cast(i * bScale); + + // TODO(dsinclair): Add overloads for FX_ARGB. pdfium:437 + m_argbArray[i] = + FXARGB_TODIB(FXARGB_MAKE(a1 + a3, r1 + r3, g1 + g3, b1 + b3)); + } +} diff --git a/xfa/fxgraphics/cxfa_geshading.h b/xfa/fxgraphics/cxfa_geshading.h new file mode 100644 index 0000000000..fc7a13e619 --- /dev/null +++ b/xfa/fxgraphics/cxfa_geshading.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_CXFA_GESHADING_H_ +#define XFA_FXGRAPHICS_CXFA_GESHADING_H_ + +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" +#include "core/fxge/fx_dib.h" + +#define FX_SHADING_Steps 256 + +enum CXFA_GEShading_Type { FX_SHADING_Axial = 1, FX_SHADING_Radial }; + +class CXFA_GEShading { + public: + // Axial shading. + CXFA_GEShading(const CFX_PointF& beginPoint, + const CFX_PointF& endPoint, + bool isExtendedBegin, + bool isExtendedEnd, + const FX_ARGB beginArgb, + const FX_ARGB endArgb); + + // Radial shading. + CXFA_GEShading(const CFX_PointF& beginPoint, + const CFX_PointF& endPoint, + const float beginRadius, + const float endRadius, + bool isExtendedBegin, + bool isExtendedEnd, + const FX_ARGB beginArgb, + const FX_ARGB endArgb); + virtual ~CXFA_GEShading(); + + private: + friend class CXFA_Graphics; + + void InitArgbArray(); + + const CXFA_GEShading_Type m_type; + const CFX_PointF m_beginPoint; + const CFX_PointF m_endPoint; + const float m_beginRadius; + const float m_endRadius; + const bool m_isExtendedBegin; + const bool m_isExtendedEnd; + const FX_ARGB m_beginArgb; + const FX_ARGB m_endArgb; + FX_ARGB m_argbArray[FX_SHADING_Steps]; +}; + +#endif // XFA_FXGRAPHICS_CXFA_GESHADING_H_ diff --git a/xfa/fxgraphics/cxfa_graphics.cpp b/xfa/fxgraphics/cxfa_graphics.cpp index 7cb83e10aa..66a109ddaa 100644 --- a/xfa/fxgraphics/cxfa_graphics.cpp +++ b/xfa/fxgraphics/cxfa_graphics.cpp @@ -12,10 +12,10 @@ #include "core/fxge/cfx_renderdevice.h" #include "core/fxge/cfx_unicodeencoding.h" #include "third_party/base/ptr_util.h" -#include "xfa/fxgraphics/cxfa_color.h" -#include "xfa/fxgraphics/cxfa_path.h" -#include "xfa/fxgraphics/cxfa_pattern.h" -#include "xfa/fxgraphics/cxfa_shading.h" +#include "xfa/fxgraphics/cxfa_gecolor.h" +#include "xfa/fxgraphics/cxfa_gepath.h" +#include "xfa/fxgraphics/cxfa_gepattern.h" +#include "xfa/fxgraphics/cxfa_geshading.h" namespace { @@ -168,24 +168,24 @@ void CXFA_Graphics::EnableActOnDash() { m_info.isActOnDash = true; } -void CXFA_Graphics::SetStrokeColor(const CXFA_Color& color) { +void CXFA_Graphics::SetStrokeColor(const CXFA_GEColor& color) { if (m_type == FX_CONTEXT_Device && m_renderDevice) m_info.strokeColor = color; } -void CXFA_Graphics::SetFillColor(const CXFA_Color& color) { +void CXFA_Graphics::SetFillColor(const CXFA_GEColor& color) { if (m_type == FX_CONTEXT_Device && m_renderDevice) m_info.fillColor = color; } -void CXFA_Graphics::StrokePath(CXFA_Path* path, const CFX_Matrix* matrix) { +void CXFA_Graphics::StrokePath(CXFA_GEPath* path, const CFX_Matrix* matrix) { if (!path) return; if (m_type == FX_CONTEXT_Device && m_renderDevice) RenderDeviceStrokePath(path, matrix); } -void CXFA_Graphics::FillPath(CXFA_Path* path, +void CXFA_Graphics::FillPath(CXFA_GEPath* path, FX_FillMode fillMode, const CFX_Matrix* matrix) { if (!path) @@ -268,9 +268,9 @@ void CXFA_Graphics::RenderDeviceSetLineDash(FX_DashStyle dashStyle) { } } -void CXFA_Graphics::RenderDeviceStrokePath(const CXFA_Path* path, +void CXFA_Graphics::RenderDeviceStrokePath(const CXFA_GEPath* path, const CFX_Matrix* matrix) { - if (m_info.strokeColor.GetType() != CXFA_Color::Solid) + if (m_info.strokeColor.GetType() != CXFA_GEColor::Solid) return; CFX_Matrix m = m_info.CTM; @@ -281,7 +281,7 @@ void CXFA_Graphics::RenderDeviceStrokePath(const CXFA_Path* path, m_info.strokeColor.GetArgb(), 0); } -void CXFA_Graphics::RenderDeviceFillPath(const CXFA_Path* path, +void CXFA_Graphics::RenderDeviceFillPath(const CXFA_GEPath* path, FX_FillMode fillMode, const CFX_Matrix* matrix) { CFX_Matrix m = m_info.CTM; @@ -289,14 +289,14 @@ void CXFA_Graphics::RenderDeviceFillPath(const CXFA_Path* path, m.Concat(*matrix); switch (m_info.fillColor.GetType()) { - case CXFA_Color::Solid: + case CXFA_GEColor::Solid: m_renderDevice->DrawPath(path->GetPathData(), &m, &m_info.graphState, m_info.fillColor.GetArgb(), 0x0, fillMode); return; - case CXFA_Color::Pattern: + case CXFA_GEColor::Pattern: FillPathWithPattern(path, fillMode, m); return; - case CXFA_Color::Shading: + case CXFA_GEColor::Shading: FillPathWithShading(path, fillMode, m); return; default: @@ -329,10 +329,10 @@ void CXFA_Graphics::RenderDeviceStretchImage( FXSYS_round(r.left - left), FXSYS_round(r.top - top)); } -void CXFA_Graphics::FillPathWithPattern(const CXFA_Path* path, +void CXFA_Graphics::FillPathWithPattern(const CXFA_GEPath* path, FX_FillMode fillMode, const CFX_Matrix& matrix) { - CXFA_Pattern* pattern = m_info.fillColor.GetPattern(); + CXFA_GEPattern* pattern = m_info.fillColor.GetPattern(); RetainPtr bitmap = m_renderDevice->GetBitmap(); int32_t width = bitmap->GetWidth(); int32_t height = bitmap->GetHeight(); @@ -363,7 +363,7 @@ void CXFA_Graphics::FillPathWithPattern(const CXFA_Path* path, SetDIBitsWithMatrix(bmp, pattern->m_matrix); } -void CXFA_Graphics::FillPathWithShading(const CXFA_Path* path, +void CXFA_Graphics::FillPathWithShading(const CXFA_GEPath* path, FX_FillMode fillMode, const CFX_Matrix& matrix) { RetainPtr bitmap = m_renderDevice->GetBitmap(); diff --git a/xfa/fxgraphics/cxfa_graphics.h b/xfa/fxgraphics/cxfa_graphics.h index 6b9dcb9a86..16cd123fc7 100644 --- a/xfa/fxgraphics/cxfa_graphics.h +++ b/xfa/fxgraphics/cxfa_graphics.h @@ -16,9 +16,9 @@ #include "core/fxge/cfx_renderdevice.h" #include "core/fxge/fx_dib.h" #include "core/fxge/fx_font.h" -#include "xfa/fxgraphics/cxfa_color.h" +#include "xfa/fxgraphics/cxfa_gecolor.h" -class CXFA_Path; +class CXFA_GEPath; using FX_FillMode = int32_t; @@ -58,11 +58,11 @@ class CXFA_Graphics { void SetLineDash(FX_DashStyle dashStyle); void SetLineWidth(float lineWidth); void EnableActOnDash(); - void SetStrokeColor(const CXFA_Color& color); - void SetFillColor(const CXFA_Color& color); + void SetStrokeColor(const CXFA_GEColor& color); + void SetFillColor(const CXFA_GEColor& color); void SetClipRect(const CFX_RectF& rect); - void StrokePath(CXFA_Path* path, const CFX_Matrix* matrix); - void FillPath(CXFA_Path* path, + void StrokePath(CXFA_GEPath* path, const CFX_Matrix* matrix); + void FillPath(CXFA_GEPath* path, FX_FillMode fillMode, const CFX_Matrix* matrix); void StretchImage(const RetainPtr& source, @@ -82,23 +82,24 @@ class CXFA_Graphics { CFX_GraphStateData graphState; CFX_Matrix CTM; bool isActOnDash; - CXFA_Color strokeColor; - CXFA_Color fillColor; + CXFA_GEColor strokeColor; + CXFA_GEColor fillColor; } m_info; void RenderDeviceSetLineDash(FX_DashStyle dashStyle); - void RenderDeviceStrokePath(const CXFA_Path* path, const CFX_Matrix* matrix); - void RenderDeviceFillPath(const CXFA_Path* path, + void RenderDeviceStrokePath(const CXFA_GEPath* path, + const CFX_Matrix* matrix); + void RenderDeviceFillPath(const CXFA_GEPath* path, FX_FillMode fillMode, const CFX_Matrix* matrix); void RenderDeviceStretchImage(const RetainPtr& source, const CFX_RectF& rect, const CFX_Matrix& matrix); - void FillPathWithPattern(const CXFA_Path* path, + void FillPathWithPattern(const CXFA_GEPath* path, FX_FillMode fillMode, const CFX_Matrix& matrix); - void FillPathWithShading(const CXFA_Path* path, + void FillPathWithShading(const CXFA_GEPath* path, FX_FillMode fillMode, const CFX_Matrix& matrix); diff --git a/xfa/fxgraphics/cxfa_path.cpp b/xfa/fxgraphics/cxfa_path.cpp deleted file mode 100644 index 6d7ed0be58..0000000000 --- a/xfa/fxgraphics/cxfa_path.cpp +++ /dev/null @@ -1,148 +0,0 @@ -// 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 - -#include "xfa/fxgraphics/cxfa_path.h" - -#include "core/fxge/cfx_pathdata.h" -#include "third_party/base/ptr_util.h" - -CXFA_Path::CXFA_Path() {} - -CXFA_Path::~CXFA_Path() {} - -void CXFA_Path::Clear() { - data_.Clear(); -} - -void CXFA_Path::Close() { - data_.ClosePath(); -} - -void CXFA_Path::MoveTo(const CFX_PointF& point) { - data_.AppendPoint(point, FXPT_TYPE::MoveTo, false); -} - -void CXFA_Path::LineTo(const CFX_PointF& point) { - data_.AppendPoint(point, FXPT_TYPE::LineTo, false); -} - -void CXFA_Path::BezierTo(const CFX_PointF& c1, - const CFX_PointF& c2, - const CFX_PointF& to) { - data_.AppendPoint(c1, FXPT_TYPE::BezierTo, false); - data_.AppendPoint(c2, FXPT_TYPE::BezierTo, false); - data_.AppendPoint(to, FXPT_TYPE::BezierTo, false); -} - -void CXFA_Path::ArcTo(const CFX_PointF& pos, - const CFX_SizeF& size, - float start_angle, - float sweep_angle) { - CFX_SizeF new_size = size / 2.0f; - ArcToInternal(CFX_PointF(pos.x + new_size.width, pos.y + new_size.height), - new_size, start_angle, sweep_angle); -} - -void CXFA_Path::ArcToInternal(const CFX_PointF& pos, - const CFX_SizeF& size, - float start_angle, - float sweep_angle) { - float x0 = cos(sweep_angle / 2); - float y0 = sin(sweep_angle / 2); - float tx = ((1.0f - x0) * 4) / (3 * 1.0f); - float ty = y0 - ((tx * x0) / y0); - - CFX_PointF points[] = {CFX_PointF(x0 + tx, -ty), CFX_PointF(x0 + tx, ty)}; - float sn = sin(start_angle + sweep_angle / 2); - float cs = cos(start_angle + sweep_angle / 2); - - CFX_PointF bezier; - bezier.x = pos.x + (size.width * ((points[0].x * cs) - (points[0].y * sn))); - bezier.y = pos.y + (size.height * ((points[0].x * sn) + (points[0].y * cs))); - data_.AppendPoint(bezier, FXPT_TYPE::BezierTo, false); - - bezier.x = pos.x + (size.width * ((points[1].x * cs) - (points[1].y * sn))); - bezier.y = pos.y + (size.height * ((points[1].x * sn) + (points[1].y * cs))); - data_.AppendPoint(bezier, FXPT_TYPE::BezierTo, false); - - bezier.x = pos.x + (size.width * cos(start_angle + sweep_angle)); - bezier.y = pos.y + (size.height * sin(start_angle + sweep_angle)); - data_.AppendPoint(bezier, FXPT_TYPE::BezierTo, false); -} - -void CXFA_Path::AddLine(const CFX_PointF& p1, const CFX_PointF& p2) { - data_.AppendPoint(p1, FXPT_TYPE::MoveTo, false); - data_.AppendPoint(p2, FXPT_TYPE::LineTo, false); -} - -void CXFA_Path::AddRectangle(float left, float top, float width, float height) { - data_.AppendRect(left, top, left + width, top + height); -} - -void CXFA_Path::AddEllipse(const CFX_RectF& rect) { - AddArc(rect.TopLeft(), rect.Size(), 0, FX_PI * 2); -} - -void CXFA_Path::AddArc(const CFX_PointF& original_pos, - const CFX_SizeF& original_size, - float start_angle, - float sweep_angle) { - if (sweep_angle == 0) - return; - - const float bezier_arc_angle_epsilon = 0.01f; - while (start_angle > FX_PI * 2) - start_angle -= FX_PI * 2; - while (start_angle < 0) - start_angle += FX_PI * 2; - if (sweep_angle >= FX_PI * 2) - sweep_angle = FX_PI * 2; - if (sweep_angle <= -FX_PI * 2) - sweep_angle = -FX_PI * 2; - - CFX_SizeF size = original_size / 2; - CFX_PointF pos(original_pos.x + size.width, original_pos.y + size.height); - data_.AppendPoint(pos + CFX_PointF(size.width * cos(start_angle), - size.height * sin(start_angle)), - FXPT_TYPE::MoveTo, false); - - float total_sweep = 0; - float local_sweep = 0; - float prev_sweep = 0; - bool done = false; - do { - if (sweep_angle < 0) { - prev_sweep = total_sweep; - local_sweep = -FX_PI / 2; - total_sweep -= FX_PI / 2; - if (total_sweep <= sweep_angle + bezier_arc_angle_epsilon) { - local_sweep = sweep_angle - prev_sweep; - done = true; - } - } else { - prev_sweep = total_sweep; - local_sweep = FX_PI / 2; - total_sweep += FX_PI / 2; - if (total_sweep >= sweep_angle - bezier_arc_angle_epsilon) { - local_sweep = sweep_angle - prev_sweep; - done = true; - } - } - - ArcToInternal(pos, size, start_angle, local_sweep); - start_angle += local_sweep; - } while (!done); -} - -void CXFA_Path::AddSubpath(CXFA_Path* path) { - if (!path) - return; - data_.Append(&path->data_, nullptr); -} - -void CXFA_Path::TransformBy(const CFX_Matrix& mt) { - data_.Transform(&mt); -} diff --git a/xfa/fxgraphics/cxfa_path.h b/xfa/fxgraphics/cxfa_path.h deleted file mode 100644 index 9c71a4d5ff..0000000000 --- a/xfa/fxgraphics/cxfa_path.h +++ /dev/null @@ -1,55 +0,0 @@ -// 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_CXFA_PATH_H_ -#define XFA_FXGRAPHICS_CXFA_PATH_H_ - -#include "core/fxcrt/fx_system.h" -#include "core/fxge/cfx_pathdata.h" -#include "xfa/fxgraphics/cxfa_graphics.h" - -class CXFA_Path final { - public: - CXFA_Path(); - ~CXFA_Path(); - - const CFX_PathData* GetPathData() const { return &data_; } - - void Clear(); - bool IsEmpty() const { return data_.GetPoints().empty(); } - void TransformBy(const CFX_Matrix& mt); - - void Close(); - void MoveTo(const CFX_PointF& point); - void LineTo(const CFX_PointF& point); - void BezierTo(const CFX_PointF& c1, - const CFX_PointF& c2, - const CFX_PointF& to); - void ArcTo(const CFX_PointF& pos, - const CFX_SizeF& size, - float startAngle, - float sweepAngle); - - void AddLine(const CFX_PointF& p1, const CFX_PointF& p2); - void AddRectangle(float left, float top, float width, float height); - void AddEllipse(const CFX_RectF& rect); - void AddArc(const CFX_PointF& pos, - const CFX_SizeF& size, - float startAngle, - float sweepAngle); - - void AddSubpath(CXFA_Path* path); - - private: - void ArcToInternal(const CFX_PointF& pos, - const CFX_SizeF& size, - float start_angle, - float sweep_angle); - - CFX_PathData data_; -}; - -#endif // XFA_FXGRAPHICS_CXFA_PATH_H_ diff --git a/xfa/fxgraphics/cxfa_pattern.cpp b/xfa/fxgraphics/cxfa_pattern.cpp deleted file mode 100644 index ea6cea87a5..0000000000 --- a/xfa/fxgraphics/cxfa_pattern.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// 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 - -#include "xfa/fxgraphics/cxfa_pattern.h" - -CXFA_Pattern::CXFA_Pattern(FX_HatchStyle hatchStyle, - const FX_ARGB foreArgb, - const FX_ARGB backArgb, - CFX_Matrix* matrix) - : m_hatchStyle(hatchStyle), m_foreArgb(foreArgb), m_backArgb(backArgb) { - if (matrix) - m_matrix = *matrix; - else - m_matrix.SetIdentity(); -} - -CXFA_Pattern::~CXFA_Pattern() {} diff --git a/xfa/fxgraphics/cxfa_pattern.h b/xfa/fxgraphics/cxfa_pattern.h deleted file mode 100644 index 838ec98b01..0000000000 --- a/xfa/fxgraphics/cxfa_pattern.h +++ /dev/null @@ -1,36 +0,0 @@ -// 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_CXFA_PATTERN_H_ -#define XFA_FXGRAPHICS_CXFA_PATTERN_H_ - -#include "core/fxcrt/fx_coordinates.h" -#include "core/fxcrt/fx_system.h" -#include "xfa/fxgraphics/cxfa_graphics.h" - -class CFX_DIBitmap; -class CFX_Matrix; - -class CXFA_Pattern { - public: - CXFA_Pattern(FX_HatchStyle hatchStyle, - const FX_ARGB foreArgb, - const FX_ARGB backArgb, - CFX_Matrix* matrix = nullptr); - - virtual ~CXFA_Pattern(); - - private: - friend class CXFA_Graphics; - - CFX_Matrix m_matrix; - - const FX_HatchStyle m_hatchStyle; - const FX_ARGB m_foreArgb; - const FX_ARGB m_backArgb; -}; - -#endif // XFA_FXGRAPHICS_CXFA_PATTERN_H_ diff --git a/xfa/fxgraphics/cxfa_shading.cpp b/xfa/fxgraphics/cxfa_shading.cpp deleted file mode 100644 index 599a3f9d42..0000000000 --- a/xfa/fxgraphics/cxfa_shading.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// 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 - -#include "xfa/fxgraphics/cxfa_shading.h" - -CXFA_Shading::CXFA_Shading(const CFX_PointF& beginPoint, - const CFX_PointF& endPoint, - bool isExtendedBegin, - bool isExtendedEnd, - const FX_ARGB beginArgb, - const FX_ARGB endArgb) - : m_type(FX_SHADING_Axial), - m_beginPoint(beginPoint), - m_endPoint(endPoint), - m_beginRadius(0), - m_endRadius(0), - m_isExtendedBegin(isExtendedBegin), - m_isExtendedEnd(isExtendedEnd), - m_beginArgb(beginArgb), - m_endArgb(endArgb) { - InitArgbArray(); -} - -CXFA_Shading::CXFA_Shading(const CFX_PointF& beginPoint, - const CFX_PointF& endPoint, - const float beginRadius, - const float endRadius, - bool isExtendedBegin, - bool isExtendedEnd, - const FX_ARGB beginArgb, - const FX_ARGB endArgb) - : m_type(FX_SHADING_Radial), - m_beginPoint(beginPoint), - m_endPoint(endPoint), - m_beginRadius(beginRadius), - m_endRadius(endRadius), - m_isExtendedBegin(isExtendedBegin), - m_isExtendedEnd(isExtendedEnd), - m_beginArgb(beginArgb), - m_endArgb(endArgb) { - InitArgbArray(); -} - -CXFA_Shading::~CXFA_Shading() {} - -void CXFA_Shading::InitArgbArray() { - int32_t a1; - int32_t r1; - int32_t g1; - int32_t b1; - std::tie(a1, r1, g1, b1) = ArgbDecode(m_beginArgb); - - int32_t a2; - int32_t r2; - int32_t g2; - int32_t b2; - std::tie(a2, r2, g2, b2) = ArgbDecode(m_endArgb); - - float f = static_cast(FX_SHADING_Steps - 1); - float aScale = 1.0 * (a2 - a1) / f; - float rScale = 1.0 * (r2 - r1) / f; - float gScale = 1.0 * (g2 - g1) / f; - float bScale = 1.0 * (b2 - b1) / f; - - for (int32_t i = 0; i < FX_SHADING_Steps; i++) { - int32_t a3 = static_cast(i * aScale); - int32_t r3 = static_cast(i * rScale); - int32_t g3 = static_cast(i * gScale); - int32_t b3 = static_cast(i * bScale); - - // TODO(dsinclair): Add overloads for FX_ARGB. pdfium:437 - m_argbArray[i] = - FXARGB_TODIB(FXARGB_MAKE(a1 + a3, r1 + r3, g1 + g3, b1 + b3)); - } -} diff --git a/xfa/fxgraphics/cxfa_shading.h b/xfa/fxgraphics/cxfa_shading.h deleted file mode 100644 index 22ef941250..0000000000 --- a/xfa/fxgraphics/cxfa_shading.h +++ /dev/null @@ -1,56 +0,0 @@ -// 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_CXFA_SHADING_H_ -#define XFA_FXGRAPHICS_CXFA_SHADING_H_ - -#include "core/fxcrt/fx_coordinates.h" -#include "core/fxcrt/fx_system.h" -#include "core/fxge/fx_dib.h" - -#define FX_SHADING_Steps 256 - -enum CXFA_Shading_Type { FX_SHADING_Axial = 1, FX_SHADING_Radial }; - -class CXFA_Shading { - public: - // Axial shading. - CXFA_Shading(const CFX_PointF& beginPoint, - const CFX_PointF& endPoint, - bool isExtendedBegin, - bool isExtendedEnd, - const FX_ARGB beginArgb, - const FX_ARGB endArgb); - - // Radial shading. - CXFA_Shading(const CFX_PointF& beginPoint, - const CFX_PointF& endPoint, - const float beginRadius, - const float endRadius, - bool isExtendedBegin, - bool isExtendedEnd, - const FX_ARGB beginArgb, - const FX_ARGB endArgb); - virtual ~CXFA_Shading(); - - private: - friend class CXFA_Graphics; - - void InitArgbArray(); - - const CXFA_Shading_Type m_type; - const CFX_PointF m_beginPoint; - const CFX_PointF m_endPoint; - const float m_beginRadius; - const float m_endRadius; - const bool m_isExtendedBegin; - const bool m_isExtendedEnd; - const FX_ARGB m_beginArgb; - const FX_ARGB m_endArgb; - FX_ARGB m_argbArray[FX_SHADING_Steps]; -}; - -#endif // XFA_FXGRAPHICS_CXFA_SHADING_H_ -- cgit v1.2.3