summaryrefslogtreecommitdiff
path: root/xfa/fde/fde_brush.h
blob: a9e99b0cd63c583bacaa5b67bab007084057ed59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// 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

#ifndef XFA_FDE_FDE_BRUSH_H_
#define XFA_FDE_FDE_BRUSH_H_

#include "core/fxcrt/include/fx_system.h"
#include "core/fxge/include/fx_dib.h"

#define FDE_BRUSHTYPE_Unknown -1
#define FDE_BRUSHTYPE_Solid 0
#define FDE_BRUSHTYPE_MAX 0

class IFDE_Brush {
 public:
  static IFDE_Brush* Create(int32_t iType);
  virtual ~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;
  virtual void SetColor(FX_ARGB color) = 0;
  virtual const CFX_Matrix& GetMatrix() const = 0;
  virtual void ResetMatrix() = 0;
  virtual void TranslateMatrix(FX_FLOAT dx, FX_FLOAT dy) = 0;
  virtual void RotateMatrix(FX_FLOAT fRadian) = 0;
  virtual void ScaleMatrix(FX_FLOAT sx, FX_FLOAT sy) = 0;
  virtual void ConcatMatrix(const CFX_Matrix& matrix) = 0;
  virtual void SetMatrix(const CFX_Matrix& matrix) = 0;
};

#endif  // XFA_FDE_FDE_BRUSH_H_