Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / xfa / src / fdp / include / fde_pen.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _FDE_PEN\r
8 #define _FDE_PEN\r
9 class IFDE_Pen;\r
10 #define FDE_PENTYPE_Unknown                             FDE_BRUSHTYPE_Unknown\r
11 #define FDE_PENTYPE_SolidColor                  FDE_BRUSHTYPE_Solid\r
12 #define FDE_PENTYPE_HatchBrush                  FDE_BRUSHTYPE_Hatch\r
13 #define FDE_PENTYPE_TextureBrush                FDE_BRUSHTYPE_Texture\r
14 #define FDE_PENTYPE_LinearGradient              FDE_BRUSHTYPE_LinearGradient\r
15 #define FDE_PENTYPE_MAX                                 FDE_BRUSHTYPE_MAX\r
16 #define FDE_DASHSTYLE_Solid                     0\r
17 #define FDE_DASHSTYLE_Dash                      1\r
18 #define FDE_DASHSTYLE_Dot                       2\r
19 #define FDE_DASHSTYLE_DashDot           3\r
20 #define FDE_DASHSTYLE_DashDotDot        4\r
21 #define FDE_DASHSTYLE_Customized        5\r
22 #define FDE_LINEJOIN_Miter                      0\r
23 #define FDE_LINEJOIN_Round                      1\r
24 #define FDE_LINEJOIN_Bevel                      2\r
25 #define FDE_LINECAP_Flat                        0\r
26 #define FDE_LINECAP_Round                       1\r
27 #define FDE_LINECAP_Square                      2\r
28 typedef struct _FDE_COMPOUNDPATTERN {\r
29     FX_FLOAT    pos;\r
30     FX_FLOAT    width;\r
31 } FDE_COMPOUNDPATTERN, * FDE_LPCOMPOUNDPATTERN;\r
32 typedef FDE_COMPOUNDPATTERN const *                             FDE_LPCCOMPOUNDPATTERN;\r
33 typedef CFX_ArrayTemplate<FDE_COMPOUNDPATTERN>  CFDE_CompoundPatterns;\r
34 class IFDE_Pen\r
35 {\r
36 public:\r
37     static IFDE_Pen*                    Create();\r
38     virtual void                                Release() = 0;\r
39     virtual int32_t                     GetType() const = 0;\r
40     virtual FX_ARGB                             GetColor() const = 0;\r
41     virtual void                                SetColor(FX_ARGB color) = 0;\r
42     virtual IFDE_Brush*                 GetBrush() const = 0;\r
43     virtual void                                SetBrush(IFDE_Brush *pBrush, FX_BOOL bAutoRelease) = 0;\r
44     virtual int32_t                     GetLineCap() const = 0;\r
45     virtual void                                SetLineCap(int32_t iLineCap) = 0;\r
46     virtual int32_t                     GetDashStyle() const = 0;\r
47     virtual void                                SetDashStyle(int32_t iDashStyle) = 0;\r
48     virtual FX_FLOAT                    GetDashPhase() const = 0;\r
49     virtual void                                SetDashPhase(FX_FLOAT fPhase) = 0;\r
50     virtual int32_t                     CountDashArray() const = 0;\r
51     virtual int32_t                     GetDashArray(CFX_FloatArray &dashArray) const = 0;\r
52     virtual void                                SetDashArray(const CFX_FloatArray &dashArray) = 0;\r
53     virtual int32_t                     GetLineJoin() const = 0;\r
54     virtual void                                SetLineJoin(int32_t iLineJoin) = 0;\r
55     virtual FX_FLOAT                    GetMiterLimit() const = 0;\r
56     virtual void                                SetMiterLimit(FX_FLOAT fMiterLimit) = 0;\r
57     virtual int32_t                     CountCompoundPatterns() const = 0;\r
58     virtual FX_BOOL                             GetCompoundPatterns(CFDE_CompoundPatterns &compoundPatterns) const = 0;\r
59     virtual FX_BOOL                             SetCompoundPatterns(const CFDE_CompoundPatterns &compoundPatterns) = 0;\r
60 };\r
61 #endif\r