diff options
Diffstat (limited to 'xfa/src/fdp')
-rw-r--r-- | xfa/src/fdp/include/fde.h | 24 | ||||
-rw-r--r-- | xfa/src/fdp/include/fde_brs.h | 17 | ||||
-rw-r--r-- | xfa/src/fdp/src/css/fde_csscache.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fdp/src/css/fde_cssdeclaration.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fdp/src/css/fde_cssstylesheet.cpp | 3 |
5 files changed, 19 insertions, 29 deletions
diff --git a/xfa/src/fdp/include/fde.h b/xfa/src/fdp/include/fde.h deleted file mode 100644 index 9a6a663d10..0000000000 --- a/xfa/src/fdp/include/fde.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2014 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 - -// TODO(thestig): Remove this file and do IWYU. - -#ifndef XFA_SRC_FDP_INCLUDE_FDE_H_ -#define XFA_SRC_FDP_INCLUDE_FDE_H_ - -#include "xfa/src/fdp/include/fde_brs.h" -#include "xfa/src/fdp/include/fde_css.h" -#include "xfa/src/fdp/include/fde_img.h" -#include "xfa/src/fdp/include/fde_mem.h" -#include "xfa/src/fdp/include/fde_pen.h" -#include "xfa/src/fdp/include/fde_psr.h" -#include "xfa/src/fdp/include/fde_pth.h" -#include "xfa/src/fdp/include/fde_rdr.h" -#include "xfa/src/fdp/include/fde_rdv.h" -#include "xfa/src/fdp/include/fde_tto.h" -#include "xfa/src/fdp/include/fde_xml.h" - -#endif // XFA_SRC_FDP_INCLUDE_FDE_H_ diff --git a/xfa/src/fdp/include/fde_brs.h b/xfa/src/fdp/include/fde_brs.h index d3d9fc8610..daea23f7d9 100644 --- a/xfa/src/fdp/include/fde_brs.h +++ b/xfa/src/fdp/include/fde_brs.h @@ -7,13 +7,12 @@ #ifndef XFA_SRC_FDP_INCLUDE_FDE_BRS_H_ #define XFA_SRC_FDP_INCLUDE_FDE_BRS_H_ +#include "core/include/fxcrt/fx_system.h" +#include "core/include/fxge/fx_dib.h" + class IFDE_Image; class IFDE_Path; -class IFDE_Brush; -class IFDE_SolidBrush; -class IFDE_HatchBrush; -class IFDE_TextureBrush; -class IFDE_LinearGradientBrush; + #define FDE_BRUSHTYPE_Unknown -1 #define FDE_BRUSHTYPE_Solid 0 #define FDE_BRUSHTYPE_Hatch 1 @@ -25,11 +24,13 @@ class IFDE_LinearGradientBrush; #define FDE_WRAPMODE_TileFlipY 2 #define FDE_WRAPMODE_TileFlipXY 3 #define FDE_WRAPMODE_Clamp 4 + struct FDE_GRADIENTCOLOR { FX_FLOAT pos; FX_ARGB color; }; typedef CFX_ArrayTemplate<FDE_GRADIENTCOLOR> CFDE_GradientColors; + class IFDE_Brush { public: static IFDE_Brush* Create(int32_t iType); @@ -37,6 +38,7 @@ class IFDE_Brush { virtual void Release() = 0; virtual int32_t GetType() const = 0; }; + class IFDE_SolidBrush : public IFDE_Brush { public: virtual FX_ARGB GetColor() const = 0; @@ -49,6 +51,7 @@ class IFDE_SolidBrush : public IFDE_Brush { virtual void ConcatMatrix(const CFX_Matrix& matrix) = 0; virtual void SetMatrix(const CFX_Matrix& matrix) = 0; }; + #define FDE_HATCHSTYLE_Horizontal 0 #define FDE_HATCHSTYLE_Vertical 1 #define FDE_HATCHSTYLE_ForwardDiagonal 2 @@ -106,6 +109,7 @@ class IFDE_SolidBrush : public IFDE_Brush { #define FDE_HATCHSTYLE_LargeGrid FDE_HATCHSTYLE_Cross #define FDE_HATCHSTYLE_Min FDE_HATCHSTYLE_Horizontal #define FDE_HATCHSTYLE_Max (FDE_HATCHSTYLE_Total - 1) + class IFDE_HatchBrush : public IFDE_Brush { public: virtual FX_ARGB GetColor(FX_BOOL bForegroundColor) const = 0; @@ -113,6 +117,7 @@ class IFDE_HatchBrush : public IFDE_Brush { virtual int32_t GetHatchStyle() const = 0; virtual FX_BOOL SetHatchStyle(int32_t iHatchStyle) = 0; }; + class IFDE_TextureBrush : public IFDE_Brush { public: virtual IFDE_Image* GetImage() const = 0; @@ -120,10 +125,12 @@ class IFDE_TextureBrush : public IFDE_Brush { virtual int32_t GetWrapMode() const = 0; virtual void SetWrapMode(int32_t iWrapMode) = 0; }; + #define FDE_LINEARGRADIENTMODE_Horizontal 0 #define FDE_LINEARGRADIENTMODE_Vertical 1 #define FDE_LINEARGRADIENTMODE_ForwardDiagonal 2 #define FDE_LINEARGRADIENTMODE_BackwardDiagonal 3 + class IFDE_LinearGradientBrush : public IFDE_Brush { public: virtual void GetLinearPoints(CFX_PointF& startingPoint, diff --git a/xfa/src/fdp/src/css/fde_csscache.cpp b/xfa/src/fdp/src/css/fde_csscache.cpp index 2aedb5f9da..bf6338bc39 100644 --- a/xfa/src/fdp/src/css/fde_csscache.cpp +++ b/xfa/src/fdp/src/css/fde_csscache.cpp @@ -6,8 +6,10 @@ #include <algorithm> +#include "xfa/src/fdp/include/fde_mem.h" #include "xfa/src/fdp/src/css/fde_csscache.h" #include "xfa/src/foxitlib.h" + FDE_CSSCACHEITEM::FDE_CSSCACHEITEM(IFDE_CSSStyleSheet* p) : pStylesheet(p), dwActivity(0) { FXSYS_assert(pStylesheet); diff --git a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp index a83ccfb575..19370000bf 100644 --- a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp +++ b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp @@ -4,8 +4,10 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "xfa/src/fdp/include/fde_mem.h" #include "xfa/src/fdp/src/css/fde_cssdeclaration.h" #include "xfa/src/foxitlib.h" + IFDE_CSSValue* CFDE_CSSDeclaration::GetProperty(FDE_CSSPROPERTY eProperty, FX_BOOL& bImportant) const { for (const FDE_CSSPROPERTYHOLDER* pHolder = m_pFirstProperty; pHolder; diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp index b8046280f2..c2a3660ff1 100644 --- a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp +++ b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp @@ -4,10 +4,12 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "xfa/src/fdp/include/fde_mem.h" #include "xfa/src/fdp/src/css/fde_cssdatatable.h" #include "xfa/src/fdp/src/css/fde_cssstylesheet.h" #include "xfa/src/fdp/src/css/fde_csssyntax.h" #include "xfa/src/foxitlib.h" + IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet() { static const FX_WCHAR* s_pStyle = L"html,address,blockquote,body,dd,div,dl,dt,fieldset,form,frame,frameset," @@ -42,6 +44,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet() { return IFDE_CSSStyleSheet::LoadFromBuffer( CFX_WideString(), s_pStyle, FXSYS_wcslen(s_pStyle), FX_CODEPAGE_UTF8); } + IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream( const CFX_WideString& szUrl, IFX_Stream* pStream, |