OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_SRC_FDP_INCLUDE_FDE_BRS_H_ | 7 #ifndef XFA_SRC_FDP_INCLUDE_FDE_BRS_H_ |
8 #define XFA_SRC_FDP_INCLUDE_FDE_BRS_H_ | 8 #define XFA_SRC_FDP_INCLUDE_FDE_BRS_H_ |
9 | 9 |
10 class IFDE_Image; | 10 class IFDE_Image; |
11 class IFDE_Path; | 11 class IFDE_Path; |
12 class IFDE_Brush; | 12 class IFDE_Brush; |
13 class IFDE_SolidBrush; | 13 class IFDE_SolidBrush; |
14 class IFDE_HatchBrush; | 14 class IFDE_HatchBrush; |
15 class IFDE_TextureBrush; | 15 class IFDE_TextureBrush; |
16 class IFDE_LinearGradientBrush; | 16 class IFDE_LinearGradientBrush; |
17 #define FDE_BRUSHTYPE_Unknown -1 | 17 #define FDE_BRUSHTYPE_Unknown -1 |
18 #define FDE_BRUSHTYPE_Solid 0 | 18 #define FDE_BRUSHTYPE_Solid 0 |
19 #define FDE_BRUSHTYPE_Hatch 1 | 19 #define FDE_BRUSHTYPE_Hatch 1 |
20 #define FDE_BRUSHTYPE_Texture 2 | 20 #define FDE_BRUSHTYPE_Texture 2 |
21 #define FDE_BRUSHTYPE_LinearGradient 3 | 21 #define FDE_BRUSHTYPE_LinearGradient 3 |
22 #define FDE_BRUSHTYPE_MAX 3 | 22 #define FDE_BRUSHTYPE_MAX 3 |
23 #define FDE_WRAPMODE_Tile 0 | 23 #define FDE_WRAPMODE_Tile 0 |
24 #define FDE_WRAPMODE_TileFlipX 1 | 24 #define FDE_WRAPMODE_TileFlipX 1 |
25 #define FDE_WRAPMODE_TileFlipY 2 | 25 #define FDE_WRAPMODE_TileFlipY 2 |
26 #define FDE_WRAPMODE_TileFlipXY 3 | 26 #define FDE_WRAPMODE_TileFlipXY 3 |
27 #define FDE_WRAPMODE_Clamp 4 | 27 #define FDE_WRAPMODE_Clamp 4 |
28 typedef struct _FDE_GRADIENTCOLOR { | 28 struct FDE_GRADIENTCOLOR { |
29 FX_FLOAT pos; | 29 FX_FLOAT pos; |
30 FX_ARGB color; | 30 FX_ARGB color; |
31 } FDE_GRADIENTCOLOR, *FDE_LPGRADIENTCOLOR; | 31 }; |
32 typedef FDE_GRADIENTCOLOR const* FDE_LPCGRADIENTCOLOR; | |
33 typedef CFX_ArrayTemplate<FDE_GRADIENTCOLOR> CFDE_GradientColors; | 32 typedef CFX_ArrayTemplate<FDE_GRADIENTCOLOR> CFDE_GradientColors; |
34 class IFDE_Brush { | 33 class IFDE_Brush { |
35 public: | 34 public: |
36 static IFDE_Brush* Create(int32_t iType); | 35 static IFDE_Brush* Create(int32_t iType); |
37 virtual ~IFDE_Brush() {} | 36 virtual ~IFDE_Brush() {} |
38 virtual void Release() = 0; | 37 virtual void Release() = 0; |
39 virtual int32_t GetType() const = 0; | 38 virtual int32_t GetType() const = 0; |
40 }; | 39 }; |
41 class IFDE_SolidBrush : public IFDE_Brush { | 40 class IFDE_SolidBrush : public IFDE_Brush { |
42 public: | 41 public: |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 virtual void SetLinearColors(const FX_ARGB& startingColor, | 135 virtual void SetLinearColors(const FX_ARGB& startingColor, |
137 const FX_ARGB& endingColor) = 0; | 136 const FX_ARGB& endingColor) = 0; |
138 virtual int32_t CountGradientColors() const = 0; | 137 virtual int32_t CountGradientColors() const = 0; |
139 virtual FX_BOOL GetGradientColors(CFDE_GradientColors& colors) const = 0; | 138 virtual FX_BOOL GetGradientColors(CFDE_GradientColors& colors) const = 0; |
140 virtual FX_BOOL SetGradientColors(const CFDE_GradientColors& colors) = 0; | 139 virtual FX_BOOL SetGradientColors(const CFDE_GradientColors& colors) = 0; |
141 virtual int32_t GetWrapMode() const = 0; | 140 virtual int32_t GetWrapMode() const = 0; |
142 virtual void SetWrapMode(int32_t iWrapMode) = 0; | 141 virtual void SetWrapMode(int32_t iWrapMode) = 0; |
143 }; | 142 }; |
144 | 143 |
145 #endif // XFA_SRC_FDP_INCLUDE_FDE_BRS_H_ | 144 #endif // XFA_SRC_FDP_INCLUDE_FDE_BRS_H_ |
OLD | NEW |