• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef XFA_FXFA_PARSER_CXFA_LINEAR_H_
8 #define XFA_FXFA_PARSER_CXFA_LINEAR_H_
9 
10 #include "core/fxcrt/fx_coordinates.h"
11 #include "xfa/fxfa/parser/cxfa_node.h"
12 #include "xfa/fxgraphics/cxfa_gepath.h"
13 
14 class CXFA_Color;
15 class CXFA_Graphics;
16 
17 class CXFA_Linear : public CXFA_Node {
18  public:
19   static constexpr XFA_AttributeEnum kDefaultType = XFA_AttributeEnum::ToRight;
20 
21   CXFA_Linear(CXFA_Document* doc, XFA_PacketType packet);
22   ~CXFA_Linear() override;
23 
24   void Draw(CXFA_Graphics* pGS,
25             CXFA_GEPath* fillPath,
26             FX_ARGB crStart,
27             const CFX_RectF& rtFill,
28             const CFX_Matrix& matrix);
29 
30  private:
31   XFA_AttributeEnum GetType();
32   CXFA_Color* GetColorIfExists();
33 };
34 
35 #endif  // XFA_FXFA_PARSER_CXFA_LINEAR_H_
36