| 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_FDE_FDE_PEN_H_ | 7 #ifndef XFA_FDE_FDE_PEN_H_ |
| 8 #define XFA_FDE_FDE_PEN_H_ | 8 #define XFA_FDE_FDE_PEN_H_ |
| 9 | 9 |
| 10 class IFDE_Pen; | 10 class IFDE_Pen; |
| 11 | 11 |
| 12 #define FDE_PENTYPE_Unknown FDE_BRUSHTYPE_Unknown | |
| 13 #define FDE_PENTYPE_SolidColor FDE_BRUSHTYPE_Solid | 12 #define FDE_PENTYPE_SolidColor FDE_BRUSHTYPE_Solid |
| 14 #define FDE_PENTYPE_HatchBrush FDE_BRUSHTYPE_Hatch | |
| 15 #define FDE_PENTYPE_TextureBrush FDE_BRUSHTYPE_Texture | |
| 16 #define FDE_PENTYPE_LinearGradient FDE_BRUSHTYPE_LinearGradient | |
| 17 #define FDE_PENTYPE_MAX FDE_BRUSHTYPE_MAX | |
| 18 | 13 |
| 19 #define FDE_DASHSTYLE_Solid 0 | 14 #define FDE_DASHSTYLE_Solid 0 |
| 20 #define FDE_DASHSTYLE_Dash 1 | 15 #define FDE_DASHSTYLE_Dash 1 |
| 21 #define FDE_DASHSTYLE_Dot 2 | 16 #define FDE_DASHSTYLE_Dot 2 |
| 22 #define FDE_DASHSTYLE_DashDot 3 | 17 #define FDE_DASHSTYLE_DashDot 3 |
| 23 #define FDE_DASHSTYLE_DashDotDot 4 | 18 #define FDE_DASHSTYLE_DashDotDot 4 |
| 24 #define FDE_DASHSTYLE_Customized 5 | 19 #define FDE_DASHSTYLE_Customized 5 |
| 25 | 20 |
| 26 #define FDE_LINEJOIN_Miter 0 | 21 #define FDE_LINEJOIN_Miter 0 |
| 27 #define FDE_LINEJOIN_Round 1 | 22 #define FDE_LINEJOIN_Round 1 |
| 28 #define FDE_LINEJOIN_Bevel 2 | 23 #define FDE_LINEJOIN_Bevel 2 |
| 29 | 24 |
| 30 #define FDE_LINECAP_Flat 0 | 25 #define FDE_LINECAP_Flat 0 |
| 31 #define FDE_LINECAP_Round 1 | 26 #define FDE_LINECAP_Round 1 |
| 32 #define FDE_LINECAP_Square 2 | 27 #define FDE_LINECAP_Square 2 |
| 33 | 28 |
| 34 struct FDE_COMPOUNDPATTERN { | 29 struct FDE_COMPOUNDPATTERN { |
| 35 FX_FLOAT pos; | 30 FX_FLOAT pos; |
| 36 FX_FLOAT width; | 31 FX_FLOAT width; |
| 37 }; | 32 }; |
| 38 typedef CFX_ArrayTemplate<FDE_COMPOUNDPATTERN> CFDE_CompoundPatterns; | 33 typedef CFX_ArrayTemplate<FDE_COMPOUNDPATTERN> CFDE_CompoundPatterns; |
| 39 | 34 |
| 40 class IFDE_Pen { | 35 class IFDE_Pen { |
| 41 public: | 36 public: |
| 42 static IFDE_Pen* Create(); | |
| 43 virtual ~IFDE_Pen() {} | 37 virtual ~IFDE_Pen() {} |
| 38 |
| 44 virtual void Release() = 0; | 39 virtual void Release() = 0; |
| 45 virtual int32_t GetType() const = 0; | 40 virtual int32_t GetType() const = 0; |
| 46 virtual FX_ARGB GetColor() const = 0; | 41 virtual FX_ARGB GetColor() const = 0; |
| 47 virtual void SetColor(FX_ARGB color) = 0; | 42 virtual void SetColor(FX_ARGB color) = 0; |
| 48 virtual IFDE_Brush* GetBrush() const = 0; | 43 virtual IFDE_Brush* GetBrush() const = 0; |
| 49 virtual void SetBrush(IFDE_Brush* pBrush, FX_BOOL bAutoRelease) = 0; | 44 virtual void SetBrush(IFDE_Brush* pBrush, FX_BOOL bAutoRelease) = 0; |
| 50 virtual int32_t GetLineCap() const = 0; | 45 virtual int32_t GetLineCap() const = 0; |
| 51 virtual void SetLineCap(int32_t iLineCap) = 0; | 46 virtual void SetLineCap(int32_t iLineCap) = 0; |
| 52 virtual int32_t GetDashStyle() const = 0; | 47 virtual int32_t GetDashStyle() const = 0; |
| 53 virtual void SetDashStyle(int32_t iDashStyle) = 0; | 48 virtual void SetDashStyle(int32_t iDashStyle) = 0; |
| 54 virtual FX_FLOAT GetDashPhase() const = 0; | 49 virtual FX_FLOAT GetDashPhase() const = 0; |
| 55 virtual void SetDashPhase(FX_FLOAT fPhase) = 0; | 50 virtual void SetDashPhase(FX_FLOAT fPhase) = 0; |
| 56 virtual int32_t CountDashArray() const = 0; | 51 virtual int32_t CountDashArray() const = 0; |
| 57 virtual int32_t GetDashArray(CFX_FloatArray& dashArray) const = 0; | 52 virtual int32_t GetDashArray(CFX_FloatArray& dashArray) const = 0; |
| 58 virtual void SetDashArray(const CFX_FloatArray& dashArray) = 0; | 53 virtual void SetDashArray(const CFX_FloatArray& dashArray) = 0; |
| 59 virtual int32_t GetLineJoin() const = 0; | 54 virtual int32_t GetLineJoin() const = 0; |
| 60 virtual void SetLineJoin(int32_t iLineJoin) = 0; | 55 virtual void SetLineJoin(int32_t iLineJoin) = 0; |
| 61 virtual FX_FLOAT GetMiterLimit() const = 0; | 56 virtual FX_FLOAT GetMiterLimit() const = 0; |
| 62 virtual void SetMiterLimit(FX_FLOAT fMiterLimit) = 0; | 57 virtual void SetMiterLimit(FX_FLOAT fMiterLimit) = 0; |
| 63 virtual int32_t CountCompoundPatterns() const = 0; | 58 virtual int32_t CountCompoundPatterns() const = 0; |
| 64 virtual FX_BOOL GetCompoundPatterns( | 59 virtual FX_BOOL GetCompoundPatterns( |
| 65 CFDE_CompoundPatterns& compoundPatterns) const = 0; | 60 CFDE_CompoundPatterns& compoundPatterns) const = 0; |
| 66 virtual FX_BOOL SetCompoundPatterns( | 61 virtual FX_BOOL SetCompoundPatterns( |
| 67 const CFDE_CompoundPatterns& compoundPatterns) = 0; | 62 const CFDE_CompoundPatterns& compoundPatterns) = 0; |
| 68 }; | 63 }; |
| 69 | 64 |
| 70 #endif // XFA_FDE_FDE_PEN_H_ | 65 #endif // XFA_FDE_FDE_PEN_H_ |
| OLD | NEW |