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 #include "xfa/src/fde/fde_object.h" | 7 #include "xfa/fde/fde_object.h" |
8 | 8 |
9 IFDE_Pen* IFDE_Pen::Create() { | 9 IFDE_Pen* IFDE_Pen::Create() { |
10 return new CFDE_Pen(); | 10 return new CFDE_Pen(); |
11 } | 11 } |
12 IFDE_Brush* IFDE_Brush::Create(int32_t iType) { | 12 IFDE_Brush* IFDE_Brush::Create(int32_t iType) { |
13 switch (iType) { | 13 switch (iType) { |
14 case FDE_BRUSHTYPE_Solid: | 14 case FDE_BRUSHTYPE_Solid: |
15 return new CFDE_SolidBrush; | 15 return new CFDE_SolidBrush; |
16 case FDE_BRUSHTYPE_Hatch: | 16 case FDE_BRUSHTYPE_Hatch: |
17 return new CFDE_HatchBrush; | 17 return new CFDE_HatchBrush; |
18 case FDE_BRUSHTYPE_Texture: | 18 case FDE_BRUSHTYPE_Texture: |
19 return new CFDE_TextureBrush; | 19 return new CFDE_TextureBrush; |
20 case FDE_BRUSHTYPE_LinearGradient: | 20 case FDE_BRUSHTYPE_LinearGradient: |
21 return new CFDE_LinearBrush; | 21 return new CFDE_LinearBrush; |
22 default: | 22 default: |
23 return NULL; | 23 return NULL; |
24 } | 24 } |
25 } | 25 } |
OLD | NEW |