summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-12 09:51:45 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-12 09:51:45 -0700
commit25c223d1c3a662a0e69a5bf95083afbd5fa3cd97 (patch)
treed1b6a27b093b969696c2697dd183deb21d8cb6bd
parentf9924422a4cd1d1b6d2d4240c83b5c1082da3629 (diff)
downloadpdfium-25c223d1c3a662a0e69a5bf95083afbd5fa3cd97.tar.xz
Only SolidBrush types are created, remove other brushes.
We only ever create a CFDE_SolidBrush, there is nothing which creates Texture, Hatch or LinearGradient brushes. This Cl removes all the code that isn't used for SolidBrush. A followup Cl will rename SolidBrush to Brush and remove the Brush interface in favour of the concrete class. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1877383002
-rw-r--r--BUILD.gn3
-rw-r--r--xfa.gyp3
-rw-r--r--xfa/fde/fde_brush.h114
-rw-r--r--xfa/fde/fde_devbasic.cpp550
-rw-r--r--xfa/fde/fde_devbasic.h20
-rw-r--r--xfa/fde/fde_gedevice.cpp201
-rw-r--r--xfa/fde/fde_gedevice.h15
-rw-r--r--xfa/fde/fde_object.cpp25
-rw-r--r--xfa/fde/fde_object.h130
-rw-r--r--xfa/fde/fde_pen.h7
-rw-r--r--xfa/fde/fde_render.cpp3
-rw-r--r--xfa/fde/tto/fde_textout.cpp6
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp9
13 files changed, 24 insertions, 1062 deletions
diff --git a/BUILD.gn b/BUILD.gn
index eecdb5ac4d..6a51815ffc 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -906,8 +906,6 @@ if (pdf_enable_xfa) {
"xfa/fde/css/fde_csssyntax.cpp",
"xfa/fde/css/fde_csssyntax.h",
"xfa/fde/fde_brush.h",
- "xfa/fde/fde_devbasic.cpp",
- "xfa/fde/fde_devbasic.h",
"xfa/fde/fde_gedevice.cpp",
"xfa/fde/fde_gedevice.h",
"xfa/fde/fde_geobject.cpp",
@@ -915,7 +913,6 @@ if (pdf_enable_xfa) {
"xfa/fde/fde_image.h",
"xfa/fde/fde_iterator.cpp",
"xfa/fde/fde_iterator.h",
- "xfa/fde/fde_object.cpp",
"xfa/fde/fde_object.h",
"xfa/fde/fde_path.h",
"xfa/fde/fde_pen.h",
diff --git a/xfa.gyp b/xfa.gyp
index 671b7ba676..cb3893a854 100644
--- a/xfa.gyp
+++ b/xfa.gyp
@@ -62,8 +62,6 @@
"xfa/fde/css/fde_csssyntax.cpp",
"xfa/fde/css/fde_csssyntax.h",
"xfa/fde/fde_brush.h",
- "xfa/fde/fde_devbasic.cpp",
- "xfa/fde/fde_devbasic.h",
"xfa/fde/fde_renderdevice.h",
"xfa/fde/fde_gedevice.cpp",
"xfa/fde/fde_gedevice.h",
@@ -72,7 +70,6 @@
"xfa/fde/fde_image.h",
"xfa/fde/fde_iterator.cpp",
"xfa/fde/fde_iterator.h",
- "xfa/fde/fde_object.cpp",
"xfa/fde/fde_object.h",
"xfa/fde/fde_path.h",
"xfa/fde/fde_pen.h",
diff --git a/xfa/fde/fde_brush.h b/xfa/fde/fde_brush.h
index 924ef62c12..a9e99b0cd6 100644
--- a/xfa/fde/fde_brush.h
+++ b/xfa/fde/fde_brush.h
@@ -10,25 +10,9 @@
#include "core/fxcrt/include/fx_system.h"
#include "core/fxge/include/fx_dib.h"
-class IFDE_Image;
-
#define FDE_BRUSHTYPE_Unknown -1
#define FDE_BRUSHTYPE_Solid 0
-#define FDE_BRUSHTYPE_Hatch 1
-#define FDE_BRUSHTYPE_Texture 2
-#define FDE_BRUSHTYPE_LinearGradient 3
-#define FDE_BRUSHTYPE_MAX 3
-#define FDE_WRAPMODE_Tile 0
-#define FDE_WRAPMODE_TileFlipX 1
-#define FDE_WRAPMODE_TileFlipY 2
-#define FDE_WRAPMODE_TileFlipXY 3
-#define FDE_WRAPMODE_Clamp 4
-
-struct FDE_GRADIENTCOLOR {
- FX_FLOAT pos;
- FX_ARGB color;
-};
-typedef CFX_ArrayTemplate<FDE_GRADIENTCOLOR> CFDE_GradientColors;
+#define FDE_BRUSHTYPE_MAX 0
class IFDE_Brush {
public:
@@ -51,100 +35,4 @@ class IFDE_SolidBrush : public IFDE_Brush {
virtual void SetMatrix(const CFX_Matrix& matrix) = 0;
};
-#define FDE_HATCHSTYLE_Horizontal 0
-#define FDE_HATCHSTYLE_Vertical 1
-#define FDE_HATCHSTYLE_ForwardDiagonal 2
-#define FDE_HATCHSTYLE_BackwardDiagonal 3
-#define FDE_HATCHSTYLE_Cross 4
-#define FDE_HATCHSTYLE_DiagonalCross 5
-#define FDE_HATCHSTYLE_05Percent 6
-#define FDE_HATCHSTYLE_10Percent 7
-#define FDE_HATCHSTYLE_20Percent 8
-#define FDE_HATCHSTYLE_25Percent 9
-#define FDE_HATCHSTYLE_30Percent 10
-#define FDE_HATCHSTYLE_40Percent 11
-#define FDE_HATCHSTYLE_50Percent 12
-#define FDE_HATCHSTYLE_60Percent 13
-#define FDE_HATCHSTYLE_70Percent 14
-#define FDE_HATCHSTYLE_75Percent 15
-#define FDE_HATCHSTYLE_80Percent 16
-#define FDE_HATCHSTYLE_90Percent 17
-#define FDE_HATCHSTYLE_LightDownwardDiagonal 18
-#define FDE_HATCHSTYLE_LightUpwardDiagonal 19
-#define FDE_HATCHSTYLE_DarkDownwardDiagonal 20
-#define FDE_HATCHSTYLE_DarkUpwardDiagonal 21
-#define FDE_HATCHSTYLE_WideDownwardDiagonal 22
-#define FDE_HATCHSTYLE_WideUpwardDiagonal 23
-#define FDE_HATCHSTYLE_LightVertical 24
-#define FDE_HATCHSTYLE_LightHorizontal 25
-#define FDE_HATCHSTYLE_NarrowVertical 26
-#define FDE_HATCHSTYLE_NarrowHorizontal 27
-#define FDE_HATCHSTYLE_DarkVertical 28
-#define FDE_HATCHSTYLE_DarkHorizontal 29
-#define FDE_HATCHSTYLE_DashedDownwardDiagonal 30
-#define FDE_HATCHSTYLE_DashedUpwardDiagonal 31
-#define FDE_HATCHSTYLE_DashedHorizontal 32
-#define FDE_HATCHSTYLE_DashedVertical 33
-#define FDE_HATCHSTYLE_SmallConfetti 34
-#define FDE_HATCHSTYLE_LargeConfetti 35
-#define FDE_HATCHSTYLE_ZigZag 36
-#define FDE_HATCHSTYLE_Wave 37
-#define FDE_HATCHSTYLE_DiagonalBrick 38
-#define FDE_HATCHSTYLE_HorizontalBrick 39
-#define FDE_HATCHSTYLE_Weave 40
-#define FDE_HATCHSTYLE_Plaid 41
-#define FDE_HATCHSTYLE_Divot 42
-#define FDE_HATCHSTYLE_DottedGrid 43
-#define FDE_HATCHSTYLE_DottedDiamond 44
-#define FDE_HATCHSTYLE_Shingle 45
-#define FDE_HATCHSTYLE_Trellis 46
-#define FDE_HATCHSTYLE_Sphere 47
-#define FDE_HATCHSTYLE_SmallGrid 48
-#define FDE_HATCHSTYLE_SmallCheckerBoard 49
-#define FDE_HATCHSTYLE_LargeCheckerBoard 50
-#define FDE_HATCHSTYLE_OutlinedDiamond 51
-#define FDE_HATCHSTYLE_SolidDiamond 52
-#define FDE_HATCHSTYLE_Total 53
-#define FDE_HATCHSTYLE_LargeGrid FDE_HATCHSTYLE_Cross
-#define FDE_HATCHSTYLE_Min FDE_HATCHSTYLE_Horizontal
-#define FDE_HATCHSTYLE_Max (FDE_HATCHSTYLE_Total - 1)
-
-class IFDE_HatchBrush : public IFDE_Brush {
- public:
- virtual FX_ARGB GetColor(FX_BOOL bForegroundColor) const = 0;
- virtual void SetColor(FX_ARGB color, FX_BOOL bForegroundColor) = 0;
- virtual int32_t GetHatchStyle() const = 0;
- virtual FX_BOOL SetHatchStyle(int32_t iHatchStyle) = 0;
-};
-
-class IFDE_TextureBrush : public IFDE_Brush {
- public:
- virtual IFDE_Image* GetImage() const = 0;
- virtual void SetImage(IFDE_Image* pImage, FX_BOOL bAutoRelease) = 0;
- virtual int32_t GetWrapMode() const = 0;
- virtual void SetWrapMode(int32_t iWrapMode) = 0;
-};
-
-#define FDE_LINEARGRADIENTMODE_Horizontal 0
-#define FDE_LINEARGRADIENTMODE_Vertical 1
-#define FDE_LINEARGRADIENTMODE_ForwardDiagonal 2
-#define FDE_LINEARGRADIENTMODE_BackwardDiagonal 3
-
-class IFDE_LinearGradientBrush : public IFDE_Brush {
- public:
- virtual void GetLinearPoints(CFX_PointF& startingPoint,
- CFX_PointF& endingPoint) const = 0;
- virtual void SetLinearPoints(const CFX_PointF& startingPoint,
- const CFX_PointF& endingPoint) = 0;
- virtual void GetLinearColors(FX_ARGB& startingColor,
- FX_ARGB& endingColor) const = 0;
- virtual void SetLinearColors(const FX_ARGB& startingColor,
- const FX_ARGB& endingColor) = 0;
- virtual int32_t CountGradientColors() const = 0;
- virtual FX_BOOL GetGradientColors(CFDE_GradientColors& colors) const = 0;
- virtual FX_BOOL SetGradientColors(const CFDE_GradientColors& colors) = 0;
- virtual int32_t GetWrapMode() const = 0;
- virtual void SetWrapMode(int32_t iWrapMode) = 0;
-};
-
#endif // XFA_FDE_FDE_BRUSH_H_
diff --git a/xfa/fde/fde_devbasic.cpp b/xfa/fde/fde_devbasic.cpp
deleted file mode 100644
index c85b125f73..0000000000
--- a/xfa/fde/fde_devbasic.cpp
+++ /dev/null
@@ -1,550 +0,0 @@
-// 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
-
-#include "xfa/fde/fde_devbasic.h"
-
-#include <cstdint>
-
-#include "xfa/fde/fde_brush.h"
-
-static const FDE_HATCHDATA gs_HatchBitmapData[FDE_HATCHSTYLE_Total] = {
- {16,
- 16,
- {
- 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x80, 0x80, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
- 0x10, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00,
- 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x40, 0x40, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
- 0x40, 0x40, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
- 0x02, 0x02, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
- 0x10, 0x10, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xff, 0xff, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x81, 0x81, 0x00, 0x00, 0x42, 0x42, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00,
- 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00,
- 0x42, 0x42, 0x00, 0x00, 0x81, 0x81, 0x00, 0x00, 0x81, 0x81, 0x00, 0x00,
- 0x42, 0x42, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
- 0x18, 0x18, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x42, 0x42, 0x00, 0x00,
- 0x81, 0x81, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xaa, 0xaa, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x11, 0x11, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
- 0xaa, 0xaa, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x44, 0x44, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00,
- 0xaa, 0xaa, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x11, 0x11, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x51, 0x51, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0xaa, 0xaa, 0x00, 0x00, 0x15, 0x15, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x51, 0x51, 0x00, 0x00,
- 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x15, 0x15, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xee, 0xee, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xbb, 0xbb, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0xbb, 0xbb, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0xbb, 0xbb, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0xee, 0xee, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xbb, 0xbb, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x77, 0x77, 0x00, 0x00, 0xdd, 0xdd, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00,
- 0xdd, 0xdd, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00, 0xdd, 0xdd, 0x00, 0x00,
- 0x77, 0x77, 0x00, 0x00, 0xdd, 0xdd, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00,
- 0xdd, 0xdd, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00, 0xdd, 0xdd, 0x00, 0x00,
- 0x77, 0x77, 0x00, 0x00, 0xdd, 0xdd, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00,
- 0xdd, 0xdd, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x77, 0x77, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xdd, 0xdd, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0xdd, 0xdd, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0xdd, 0xdd, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x77, 0x77, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xdd, 0xdd, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xef, 0xef, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0xef, 0xef, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0xfe, 0xfe, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xef, 0xef, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0xef, 0xef, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0xf7, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xf7, 0xf7, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x7f, 0x7f, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x88, 0x88, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x11, 0x11, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x44, 0x44, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x11, 0x11, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x11, 0x11, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x44, 0x44, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x11, 0x11, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xcc, 0xcc, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00,
- 0x99, 0x99, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00,
- 0x33, 0x33, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00,
- 0x66, 0x66, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00,
- 0xcc, 0xcc, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00,
- 0x99, 0x99, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x33, 0x33, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00,
- 0x99, 0x99, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00,
- 0xcc, 0xcc, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00,
- 0x66, 0x66, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00,
- 0x33, 0x33, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00,
- 0x99, 0x99, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xc1, 0xc1, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00,
- 0x38, 0x38, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00,
- 0x07, 0x07, 0x00, 0x00, 0x83, 0x83, 0x00, 0x00, 0xc1, 0xc1, 0x00, 0x00,
- 0xe0, 0xe0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00,
- 0x1c, 0x1c, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00,
- 0x83, 0x83, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x83, 0x83, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00,
- 0x1c, 0x1c, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00,
- 0xe0, 0xe0, 0x00, 0x00, 0xc1, 0xc1, 0x00, 0x00, 0x83, 0x83, 0x00, 0x00,
- 0x07, 0x07, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00,
- 0x38, 0x38, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x00,
- 0xc1, 0xc1, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00,
- 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00,
- 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00,
- 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00,
- 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x00,
- 0xcc, 0xcc, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x44, 0x44, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x44, 0x44, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x80, 0x80, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00,
- 0x02, 0x02, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
- 0x20, 0x20, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00,
- 0x10, 0x10, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
- 0x04, 0x04, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xb1, 0xb1, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00,
- 0x1b, 0x1b, 0x00, 0x00, 0xd8, 0xd8, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00,
- 0x0c, 0x0c, 0x00, 0x00, 0x8d, 0x8d, 0x00, 0x00, 0xb1, 0xb1, 0x00, 0x00,
- 0x30, 0x30, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x1b, 0x1b, 0x00, 0x00,
- 0xd8, 0xd8, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00,
- 0x8d, 0x8d, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x81, 0x81, 0x00, 0x00, 0x42, 0x42, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00,
- 0x18, 0x18, 0x00, 0x00, 0x81, 0x81, 0x00, 0x00, 0x42, 0x42, 0x00, 0x00,
- 0x24, 0x24, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x81, 0x81, 0x00, 0x00,
- 0x42, 0x42, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
- 0x81, 0x81, 0x00, 0x00, 0x42, 0x42, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00,
- 0x18, 0x18, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x25, 0x25, 0x00, 0x00,
- 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
- 0x25, 0x25, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x18, 0x18, 0x00, 0x00, 0x25, 0x25, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x25, 0x25, 0x00, 0x00,
- 0xc0, 0xc0, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00,
- 0x42, 0x42, 0x00, 0x00, 0x81, 0x81, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
- 0x02, 0x02, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
- 0x18, 0x18, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x42, 0x42, 0x00, 0x00,
- 0x81, 0x81, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xff, 0xff, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x88, 0x88, 0x00, 0x00, 0x54, 0x54, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x45, 0x45, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x14, 0x14, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00, 0x51, 0x51, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x54, 0x54, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x45, 0x45, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x14, 0x14, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x51, 0x51, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00,
- 0xf0, 0xf0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x55, 0x55, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
- 0xf0, 0xf0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00,
- 0xf0, 0xf0, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
- 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x10, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x03, 0x03, 0x00, 0x00, 0x84, 0x84, 0x00, 0x00, 0x48, 0x48, 0x00, 0x00,
- 0x30, 0x30, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00,
- 0x84, 0x84, 0x00, 0x00, 0x48, 0x48, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00,
- 0x0c, 0x0c, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xff, 0xff, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x66, 0x66, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x99, 0x99, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x77, 0x77, 0x00, 0x00, 0x89, 0x89, 0x00, 0x00, 0x8f, 0x8f, 0x00, 0x00,
- 0x8f, 0x8f, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00, 0x98, 0x98, 0x00, 0x00,
- 0xf8, 0xf8, 0x00, 0x00, 0xf8, 0xf8, 0x00, 0x00, 0x77, 0x77, 0x00, 0x00,
- 0x89, 0x89, 0x00, 0x00, 0x8f, 0x8f, 0x00, 0x00, 0x8f, 0x8f, 0x00, 0x00,
- 0x77, 0x77, 0x00, 0x00, 0x98, 0x98, 0x00, 0x00, 0xf8, 0xf8, 0x00, 0x00,
- 0xf8, 0xf8, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xff, 0xff, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00,
- 0x88, 0x88, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x99, 0x99, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00,
- 0x99, 0x99, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00,
- 0x66, 0x66, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00,
- 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00,
- 0x99, 0x99, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00,
- 0x99, 0x99, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0xf0, 0xf0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00,
- 0xf0, 0xf0, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00,
- 0x0f, 0x0f, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00,
- 0xf0, 0xf0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00,
- 0x0f, 0x0f, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00,
- 0x0f, 0x0f, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x82, 0x82, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00,
- 0x10, 0x10, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
- 0x82, 0x82, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x82, 0x82, 0x00, 0x00,
- 0x44, 0x44, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
- 0x28, 0x28, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x82, 0x82, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00,
- }},
- {16,
- 16,
- {
- 0x10, 0x10, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00,
- 0xfe, 0xfe, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00,
- 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
- 0x38, 0x38, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00,
- 0x7c, 0x7c, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- }},
-};
-FDE_LPCHATCHDATA FDE_DEVGetHatchData(int32_t iHatchStyle) {
- if (iHatchStyle < FDE_HATCHSTYLE_Min || iHatchStyle > FDE_HATCHSTYLE_Max) {
- return NULL;
- }
- return &gs_HatchBitmapData[iHatchStyle];
-}
diff --git a/xfa/fde/fde_devbasic.h b/xfa/fde/fde_devbasic.h
deleted file mode 100644
index 9c9b25dd3e..0000000000
--- a/xfa/fde/fde_devbasic.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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_DEVBASIC_H_
-#define XFA_FDE_FDE_DEVBASIC_H_
-
-#include <cstdint>
-
-struct FDE_HATCHDATA {
- int32_t iWidth;
- int32_t iHeight;
- uint8_t MaskBits[64];
-};
-typedef FDE_HATCHDATA const* FDE_LPCHATCHDATA;
-FDE_LPCHATCHDATA FDE_DEVGetHatchData(int32_t iHatchStyle);
-
-#endif // XFA_FDE_FDE_DEVBASIC_H_
diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp
index 1338dc4a8e..28bf889e1f 100644
--- a/xfa/fde/fde_gedevice.cpp
+++ b/xfa/fde/fde_gedevice.cpp
@@ -9,22 +9,11 @@
#include <algorithm>
#include "xfa/fde/fde_brush.h"
-#include "xfa/fde/fde_devbasic.h"
#include "xfa/fde/fde_geobject.h"
#include "xfa/fde/fde_image.h"
+#include "xfa/fde/fde_object.h"
#include "xfa/fde/fde_pen.h"
-FX_BOOL FDE_GetStockHatchMask(int32_t iHatchStyle, CFX_DIBitmap& hatchMask) {
- FDE_LPCHATCHDATA pData = FDE_DEVGetHatchData(iHatchStyle);
- if (!pData) {
- return FALSE;
- }
- hatchMask.Create(pData->iWidth, pData->iHeight, FXDIB_1bppMask);
- FXSYS_memcpy(hatchMask.GetBuffer(), pData->MaskBits,
- hatchMask.GetPitch() * pData->iHeight);
- return TRUE;
-}
-
IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_DIBitmap* pBitmap,
FX_BOOL bRgbByteOrder) {
if (pBitmap == NULL) {
@@ -378,196 +367,26 @@ FX_BOOL CFDE_FxgeDevice::CreatePen(IFDE_Pen* pPen,
}
return TRUE;
}
-typedef FX_BOOL (CFDE_FxgeDevice::*pfFillPath)(IFDE_Brush* pBrush,
- const CFX_PathData* pPath,
- const CFX_Matrix* pMatrix);
-static const pfFillPath gs_FillPath[] = {
- &CFDE_FxgeDevice::FillSolidPath, &CFDE_FxgeDevice::FillHatchPath,
- &CFDE_FxgeDevice::FillTexturePath, &CFDE_FxgeDevice::FillLinearGradientPath,
-};
+
FX_BOOL CFDE_FxgeDevice::FillPath(IFDE_Brush* pBrush,
const IFDE_Path* pPath,
const CFX_Matrix* pMatrix) {
CFDE_Path* pGePath = (CFDE_Path*)pPath;
- if (pGePath == NULL) {
+ if (!pGePath)
return FALSE;
- }
- if (pBrush == NULL) {
- return FALSE;
- }
- int32_t iType = pBrush->GetType();
- if (iType < 0 || iType > FDE_BRUSHTYPE_MAX) {
+
+ if (!pBrush)
return FALSE;
- }
- return (this->*gs_FillPath[iType])(pBrush, &pGePath->m_Path, pMatrix);
+
+ return FillSolidPath(pBrush, &pGePath->m_Path, pMatrix);
}
+
FX_BOOL CFDE_FxgeDevice::FillSolidPath(IFDE_Brush* pBrush,
const CFX_PathData* pPath,
const CFX_Matrix* pMatrix) {
FXSYS_assert(pPath && pBrush && pBrush->GetType() == FDE_BRUSHTYPE_Solid);
- IFDE_SolidBrush* pSolidBrush = (IFDE_SolidBrush*)pBrush;
+
+ IFDE_SolidBrush* pSolidBrush = static_cast<IFDE_SolidBrush*>(pBrush);
return m_pDevice->DrawPath(pPath, (const CFX_Matrix*)pMatrix, NULL,
pSolidBrush->GetColor(), 0, FXFILL_WINDING);
}
-FX_BOOL CFDE_FxgeDevice::FillHatchPath(IFDE_Brush* pBrush,
- const CFX_PathData* pPath,
- const CFX_Matrix* pMatrix) {
- FXSYS_assert(pPath && pBrush && pBrush->GetType() == FDE_BRUSHTYPE_Hatch);
- IFDE_HatchBrush* pHatchBrush = (IFDE_HatchBrush*)pBrush;
- int32_t iStyle = pHatchBrush->GetHatchStyle();
- if (iStyle < FDE_HATCHSTYLE_Min || iStyle > FDE_HATCHSTYLE_Max) {
- return FALSE;
- }
- CFX_DIBitmap mask;
- if (!FDE_GetStockHatchMask(iStyle, mask)) {
- return FALSE;
- }
- FX_ARGB dwForeColor = pHatchBrush->GetColor(TRUE);
- FX_ARGB dwBackColor = pHatchBrush->GetColor(FALSE);
- CFX_FloatRect rectf = pPath->GetBoundingBox();
- if (pMatrix) {
- rectf.Transform((const CFX_Matrix*)pMatrix);
- }
- FX_RECT rect(FXSYS_round(rectf.left), FXSYS_round(rectf.top),
- FXSYS_round(rectf.right), FXSYS_round(rectf.bottom));
- m_pDevice->SaveState();
- m_pDevice->StartRendering();
- m_pDevice->SetClip_PathFill(pPath, (const CFX_Matrix*)pMatrix,
- FXFILL_WINDING);
- m_pDevice->FillRect(&rect, dwBackColor);
- for (int32_t j = rect.bottom; j < rect.top; j += mask.GetHeight())
- for (int32_t i = rect.left; i < rect.right; i += mask.GetWidth()) {
- m_pDevice->SetBitMask(&mask, i, j, dwForeColor);
- }
- m_pDevice->EndRendering();
- m_pDevice->RestoreState();
- return TRUE;
-}
-FX_BOOL CFDE_FxgeDevice::FillTexturePath(IFDE_Brush* pBrush,
- const CFX_PathData* pPath,
- const CFX_Matrix* pMatrix) {
- FXSYS_assert(pPath && pBrush && pBrush->GetType() == FDE_BRUSHTYPE_Texture);
- IFDE_TextureBrush* pTextureBrush = static_cast<IFDE_TextureBrush*>(pBrush);
- IFDE_Image* pImage = pTextureBrush->GetImage();
- if (!pImage)
- return FALSE;
-
- CFX_Size size(pImage->GetImageWidth(), pImage->GetImageHeight());
- CFX_DIBitmap bmp;
- bmp.Create(size.x, size.y, FXDIB_Argb);
- if (!pImage->StartLoadImage(&bmp, 0, 0, size.x, size.y, 0, 0, size.x,
- size.y)) {
- return FALSE;
- }
- if (pImage->DoLoadImage() < 100) {
- return FALSE;
- }
- pImage->StopLoadImage();
- return WrapTexture(pTextureBrush->GetWrapMode(), &bmp, pPath, pMatrix);
-}
-FX_BOOL CFDE_FxgeDevice::WrapTexture(int32_t iWrapMode,
- const CFX_DIBitmap* pBitmap,
- const CFX_PathData* pPath,
- const CFX_Matrix* pMatrix) {
- CFX_FloatRect rectf = pPath->GetBoundingBox();
- if (pMatrix) {
- rectf.Transform((const CFX_Matrix*)pMatrix);
- }
- FX_RECT rect(FXSYS_round(rectf.left), FXSYS_round(rectf.top),
- FXSYS_round(rectf.right), FXSYS_round(rectf.bottom));
- rect.Normalize();
- if (rect.IsEmpty()) {
- return FALSE;
- }
- m_pDevice->SaveState();
- m_pDevice->StartRendering();
- m_pDevice->SetClip_PathFill(pPath, (const CFX_Matrix*)pMatrix,
- FXFILL_WINDING);
- switch (iWrapMode) {
- case FDE_WRAPMODE_Tile:
- case FDE_WRAPMODE_TileFlipX:
- case FDE_WRAPMODE_TileFlipY:
- case FDE_WRAPMODE_TileFlipXY: {
- FX_BOOL bFlipX = iWrapMode == FDE_WRAPMODE_TileFlipXY ||
- iWrapMode == FDE_WRAPMODE_TileFlipX;
- FX_BOOL bFlipY = iWrapMode == FDE_WRAPMODE_TileFlipXY ||
- iWrapMode == FDE_WRAPMODE_TileFlipY;
- const CFX_DIBitmap* pFlip[2][2];
- pFlip[0][0] = pBitmap;
- pFlip[0][1] = bFlipX ? pBitmap->FlipImage(TRUE, FALSE) : pBitmap;
- pFlip[1][0] = bFlipY ? pBitmap->FlipImage(FALSE, TRUE) : pBitmap;
- pFlip[1][1] =
- (bFlipX || bFlipY) ? pBitmap->FlipImage(bFlipX, bFlipY) : pBitmap;
- int32_t iCounterY = 0;
- for (int32_t j = rect.top; j < rect.bottom; j += pBitmap->GetHeight()) {
- int32_t indexY = iCounterY++ % 2;
- int32_t iCounterX = 0;
- for (int32_t i = rect.left; i < rect.right; i += pBitmap->GetWidth()) {
- int32_t indexX = iCounterX++ % 2;
- m_pDevice->SetDIBits(pFlip[indexY][indexX], i, j);
- }
- }
- if (pFlip[0][1] != pFlip[0][0]) {
- delete pFlip[0][1];
- }
- if (pFlip[1][0] != pFlip[0][0]) {
- delete pFlip[1][0];
- }
- if (pFlip[1][1] != pFlip[0][0]) {
- delete pFlip[1][1];
- }
- } break;
- case FDE_WRAPMODE_Clamp: {
- m_pDevice->SetDIBits(pBitmap, rect.left, rect.bottom);
- } break;
- }
- m_pDevice->EndRendering();
- m_pDevice->RestoreState();
- return TRUE;
-}
-FX_BOOL CFDE_FxgeDevice::FillLinearGradientPath(IFDE_Brush* pBrush,
- const CFX_PathData* pPath,
- const CFX_Matrix* pMatrix) {
- FXSYS_assert(pPath && pBrush &&
- pBrush->GetType() == FDE_BRUSHTYPE_LinearGradient);
- IFDE_LinearGradientBrush* pLinearBrush = (IFDE_LinearGradientBrush*)pBrush;
- CFX_PointF pt0, pt1;
- pLinearBrush->GetLinearPoints(pt0, pt1);
- CFX_VectorF fDiagonal(pt0, pt1);
- FX_FLOAT fTheta = FXSYS_atan2(fDiagonal.y, fDiagonal.x);
- FX_FLOAT fLength = fDiagonal.Length();
- FX_FLOAT fTotalX = fLength / FXSYS_cos(fTheta);
- FX_FLOAT fTotalY = fLength / FXSYS_cos(FX_PI / 2 - fTheta);
- FX_FLOAT fSteps = std::max(fTotalX, fTotalY);
- FX_FLOAT dx = fTotalX / fSteps;
- FX_FLOAT dy = fTotalY / fSteps;
- FX_ARGB cr0, cr1;
- pLinearBrush->GetLinearColors(cr0, cr1);
- FX_FLOAT a0 = FXARGB_A(cr0);
- FX_FLOAT r0 = FXARGB_R(cr0);
- FX_FLOAT g0 = FXARGB_G(cr0);
- FX_FLOAT b0 = FXARGB_B(cr0);
- FX_FLOAT da = (FXARGB_A(cr1) - a0) / fSteps;
- FX_FLOAT dr = (FXARGB_R(cr1) - r0) / fSteps;
- FX_FLOAT dg = (FXARGB_G(cr1) - g0) / fSteps;
- FX_FLOAT db = (FXARGB_B(cr1) - b0) / fSteps;
- CFX_DIBitmap bmp;
- bmp.Create(FXSYS_round(FXSYS_fabs(fDiagonal.x)),
- FXSYS_round(FXSYS_fabs(fDiagonal.y)), FXDIB_Argb);
- CFX_FxgeDevice dev;
- dev.Attach(&bmp);
- pt1 = pt0;
- int32_t iSteps = FXSYS_round(FXSYS_ceil(fSteps));
- while (--iSteps >= 0) {
- cr0 = ArgbEncode(FXSYS_round(a0), FXSYS_round(r0), FXSYS_round(g0),
- FXSYS_round(b0));
- dev.DrawCosmeticLine(pt0.x, pt0.y, pt1.x, pt1.y, cr0);
- pt1.x += dx;
- pt0.y += dy;
- a0 += da;
- r0 += dr;
- g0 += dg;
- b0 += db;
- }
- return WrapTexture(pLinearBrush->GetWrapMode(), &bmp, pPath, pMatrix);
-}
diff --git a/xfa/fde/fde_gedevice.h b/xfa/fde/fde_gedevice.h
index 68467395e6..c497b1c3b5 100644
--- a/xfa/fde/fde_gedevice.h
+++ b/xfa/fde/fde_gedevice.h
@@ -96,15 +96,7 @@ class CFDE_FxgeDevice : public IFDE_RenderDevice, public CFX_Target {
FX_BOOL FillSolidPath(IFDE_Brush* pBrush,
const CFX_PathData* pPath,
const CFX_Matrix* pMatrix);
- FX_BOOL FillHatchPath(IFDE_Brush* pBrush,
- const CFX_PathData* pPath,
- const CFX_Matrix* pMatrix);
- FX_BOOL FillTexturePath(IFDE_Brush* pBrush,
- const CFX_PathData* pPath,
- const CFX_Matrix* pMatrix);
- FX_BOOL FillLinearGradientPath(IFDE_Brush* pBrush,
- const CFX_PathData* pPath,
- const CFX_Matrix* pMatrix);
+
FX_BOOL DrawSolidString(IFDE_Brush* pBrush,
IFX_Font* pFont,
const FXTEXT_CHARPOS* pCharPos,
@@ -122,10 +114,7 @@ class CFDE_FxgeDevice : public IFDE_RenderDevice, public CFX_Target {
FX_BOOL CreatePen(IFDE_Pen* pPen,
FX_FLOAT fPenWidth,
CFX_GraphStateData& graphState);
- FX_BOOL WrapTexture(int32_t iWrapMode,
- const CFX_DIBitmap* pBitmap,
- const CFX_PathData* pPath,
- const CFX_Matrix* pMatrix);
+
CFX_RenderDevice* m_pDevice;
CFX_RectF m_rtClip;
FX_BOOL m_bOwnerDevice;
diff --git a/xfa/fde/fde_object.cpp b/xfa/fde/fde_object.cpp
deleted file mode 100644
index 92b9f8af1f..0000000000
--- a/xfa/fde/fde_object.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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
-
-#include "xfa/fde/fde_object.h"
-
-IFDE_Pen* IFDE_Pen::Create() {
- return new CFDE_Pen();
-}
-IFDE_Brush* IFDE_Brush::Create(int32_t iType) {
- switch (iType) {
- case FDE_BRUSHTYPE_Solid:
- return new CFDE_SolidBrush;
- case FDE_BRUSHTYPE_Hatch:
- return new CFDE_HatchBrush;
- case FDE_BRUSHTYPE_Texture:
- return new CFDE_TextureBrush;
- case FDE_BRUSHTYPE_LinearGradient:
- return new CFDE_LinearBrush;
- default:
- return NULL;
- }
-}
diff --git a/xfa/fde/fde_object.h b/xfa/fde/fde_object.h
index e222b1a562..e749778794 100644
--- a/xfa/fde/fde_object.h
+++ b/xfa/fde/fde_object.h
@@ -90,6 +90,7 @@ class CFDE_Pen : public IFDE_Pen, public CFX_Target {
CFX_FloatArray m_DashArray;
CFDE_CompoundPatterns m_CompoundPatterns;
};
+
class CFDE_SolidBrush : public IFDE_SolidBrush, public CFX_Target {
public:
CFDE_SolidBrush() : m_Color(0xFF000000) { m_Matrix.SetIdentity(); }
@@ -113,134 +114,5 @@ class CFDE_SolidBrush : public IFDE_SolidBrush, public CFX_Target {
FX_ARGB m_Color;
CFX_Matrix m_Matrix;
};
-class CFDE_HatchBrush : public IFDE_HatchBrush, public CFX_Target {
- public:
- CFDE_HatchBrush() : m_iStyle(-1), m_BackColor(0), m_ForeColor(0) {
- m_Matrix.SetIdentity();
- }
-
- virtual void Release() { delete this; }
- virtual int32_t GetType() const { return FDE_BRUSHTYPE_Hatch; }
- virtual const CFX_Matrix& GetMatrix() const { return m_Matrix; }
- virtual void ResetMatrix() { m_Matrix.SetIdentity(); }
- virtual void TranslateMatrix(FX_FLOAT dx, FX_FLOAT dy) {
- m_Matrix.Translate(dx, dy);
- }
- virtual void RotateMatrix(FX_FLOAT fRadian) { m_Matrix.Rotate(fRadian); }
- virtual void ScaleMatrix(FX_FLOAT sx, FX_FLOAT sy) { m_Matrix.Scale(sx, sy); }
- virtual void ConcatMatrix(const CFX_Matrix& matrix) {
- m_Matrix.Concat(matrix);
- }
- virtual void SetMatrix(const CFX_Matrix& matrix) { m_Matrix = matrix; }
- virtual FX_ARGB GetColor(FX_BOOL bForegroundColor) const {
- return bForegroundColor ? m_ForeColor : m_BackColor;
- }
- virtual void SetColor(FX_ARGB color, FX_BOOL bForegroundColor) {
- if (bForegroundColor) {
- m_ForeColor = color;
- } else {
- m_BackColor = color;
- }
- }
-
- virtual int32_t GetHatchStyle() const { return m_iStyle; }
- virtual FX_BOOL SetHatchStyle(int32_t iHatchStyle) {
- m_iStyle = iHatchStyle;
- return m_iStyle >= FDE_HATCHSTYLE_Min && m_iStyle <= FDE_HATCHSTYLE_Max;
- }
- int32_t m_iStyle;
- FX_ARGB m_BackColor;
- FX_ARGB m_ForeColor;
- CFX_Matrix m_Matrix;
-};
-class CFDE_TextureBrush : public IFDE_TextureBrush, public CFX_Target {
- public:
- CFDE_TextureBrush() : m_iWrap(0), m_pImage(NULL), m_bAutoRelease(FALSE) {
- m_Matrix.SetIdentity();
- }
-
- virtual void Release() { delete this; }
- virtual int32_t GetType() const { return FDE_BRUSHTYPE_Texture; }
- virtual const CFX_Matrix& GetMatrix() const { return m_Matrix; }
- virtual void ResetMatrix() { m_Matrix.SetIdentity(); }
- virtual void TranslateMatrix(FX_FLOAT dx, FX_FLOAT dy) {
- m_Matrix.Translate(dx, dy);
- }
- virtual void RotateMatrix(FX_FLOAT fRadian) { m_Matrix.Rotate(fRadian); }
- virtual void ScaleMatrix(FX_FLOAT sx, FX_FLOAT sy) { m_Matrix.Scale(sx, sy); }
- virtual void ConcatMatrix(const CFX_Matrix& matrix) {
- m_Matrix.Concat(matrix);
- }
- virtual void SetMatrix(const CFX_Matrix& matrix) { m_Matrix = matrix; }
- virtual IFDE_Image* GetImage() const { return m_pImage; }
- virtual void SetImage(IFDE_Image* pImage, FX_BOOL bAutoRelease) {
- m_pImage = pImage;
- m_bAutoRelease = bAutoRelease;
- }
- virtual int32_t GetWrapMode() const { return m_iWrap; }
- virtual void SetWrapMode(int32_t iWrapMode) { m_iWrap = iWrapMode; }
- int32_t m_iWrap;
- IFDE_Image* m_pImage;
- FX_BOOL m_bAutoRelease;
- CFX_Matrix m_Matrix;
-};
-class CFDE_LinearBrush : public IFDE_LinearGradientBrush, public CFX_Target {
- public:
- CFDE_LinearBrush() : m_EndColor(0), m_StartColor(0), m_iWrapMode(0) {
- m_StartPoint.x = m_StartPoint.y = m_EndPoint.x = m_EndPoint.y = 0;
- m_Matrix.SetIdentity();
- }
-
- virtual void Release() { delete this; }
- virtual int32_t GetType() const { return FDE_BRUSHTYPE_LinearGradient; }
- virtual const CFX_Matrix& GetMatrix() const { return m_Matrix; }
- virtual void ResetMatrix() { m_Matrix.SetIdentity(); }
- virtual void TranslateMatrix(FX_FLOAT dx, FX_FLOAT dy) {
- m_Matrix.Translate(dx, dy);
- }
- virtual void RotateMatrix(FX_FLOAT fRadian) { m_Matrix.Rotate(fRadian); }
- virtual void ScaleMatrix(FX_FLOAT sx, FX_FLOAT sy) { m_Matrix.Scale(sx, sy); }
- virtual void ConcatMatrix(const CFX_Matrix& matrix) {
- m_Matrix.Concat(matrix);
- }
- virtual void SetMatrix(const CFX_Matrix& matrix) { m_Matrix = matrix; }
- virtual void GetLinearPoints(CFX_PointF& startingPoint,
- CFX_PointF& endingPoint) const {
- startingPoint = m_StartPoint;
- endingPoint = m_EndPoint;
- }
- virtual void SetLinearPoints(const CFX_PointF& startingPoint,
- const CFX_PointF& endingPoint) {
- m_StartPoint = startingPoint;
- m_EndPoint = endingPoint;
- }
- virtual void GetLinearColors(FX_ARGB& startingColor,
- FX_ARGB& endingColor) const {
- startingColor = m_StartColor;
- endingColor = m_EndColor;
- }
- virtual void SetLinearColors(const FX_ARGB& startingColor,
- const FX_ARGB& endingColor) {
- m_StartColor = startingColor;
- m_EndColor = endingColor;
- }
- virtual int32_t CountGradientColors() const { return m_GradColors.GetSize(); }
- virtual FX_BOOL GetGradientColors(CFDE_GradientColors& colors) const {
- return colors.Copy(m_GradColors), TRUE;
- }
- virtual FX_BOOL SetGradientColors(const CFDE_GradientColors& colors) {
- return m_GradColors.Copy(colors), TRUE;
- }
-
- virtual int32_t GetWrapMode() const { return m_iWrapMode; }
- virtual void SetWrapMode(int32_t iWrapMode) { m_iWrapMode = iWrapMode; }
- CFX_PointF m_EndPoint;
- CFX_PointF m_StartPoint;
- FX_ARGB m_EndColor;
- FX_ARGB m_StartColor;
- CFDE_GradientColors m_GradColors;
- int32_t m_iWrapMode;
- CFX_Matrix m_Matrix;
-};
#endif // XFA_FDE_FDE_OBJECT_H_
diff --git a/xfa/fde/fde_pen.h b/xfa/fde/fde_pen.h
index 4dfdd8ac22..9253726b81 100644
--- a/xfa/fde/fde_pen.h
+++ b/xfa/fde/fde_pen.h
@@ -9,12 +9,7 @@
class IFDE_Pen;
-#define FDE_PENTYPE_Unknown FDE_BRUSHTYPE_Unknown
#define FDE_PENTYPE_SolidColor FDE_BRUSHTYPE_Solid
-#define FDE_PENTYPE_HatchBrush FDE_BRUSHTYPE_Hatch
-#define FDE_PENTYPE_TextureBrush FDE_BRUSHTYPE_Texture
-#define FDE_PENTYPE_LinearGradient FDE_BRUSHTYPE_LinearGradient
-#define FDE_PENTYPE_MAX FDE_BRUSHTYPE_MAX
#define FDE_DASHSTYLE_Solid 0
#define FDE_DASHSTYLE_Dash 1
@@ -39,8 +34,8 @@ typedef CFX_ArrayTemplate<FDE_COMPOUNDPATTERN> CFDE_CompoundPatterns;
class IFDE_Pen {
public:
- static IFDE_Pen* Create();
virtual ~IFDE_Pen() {}
+
virtual void Release() = 0;
virtual int32_t GetType() const = 0;
virtual FX_ARGB GetColor() const = 0;
diff --git a/xfa/fde/fde_render.cpp b/xfa/fde/fde_render.cpp
index 17bf20afbd..fed831348a 100644
--- a/xfa/fde/fde_render.cpp
+++ b/xfa/fde/fde_render.cpp
@@ -6,6 +6,7 @@
#include "xfa/fde/fde_render.h"
+#include "xfa/fde/fde_object.h"
#include "xfa/fde/fde_renderdevice.h"
#include "xfa/fgas/crt/fgas_memory.h"
@@ -216,7 +217,7 @@ void CFDE_RenderContext::RenderText(IFDE_TextSet* pTextSet,
return;
}
if (m_pSolidBrush == NULL) {
- m_pSolidBrush = (IFDE_SolidBrush*)IFDE_Brush::Create(FDE_BRUSHTYPE_Solid);
+ m_pSolidBrush = new CFDE_SolidBrush;
if (m_pSolidBrush == NULL) {
return;
}
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index a0753c450e..49d3abb8ab 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -11,6 +11,7 @@
#include "core/fxcrt/include/fx_coordinates.h"
#include "core/fxcrt/include/fx_system.h"
#include "xfa/fde/fde_brush.h"
+#include "xfa/fde/fde_object.h"
#include "xfa/fde/fde_pen.h"
#include "xfa/fde/fde_renderdevice.h"
#include "xfa/fgas/crt/fgas_memory.h"
@@ -950,8 +951,7 @@ void CFDE_TextOut::OnDraw(const CFX_RectF& rtClip) {
if (iLines < 1) {
return;
}
- IFDE_SolidBrush* pBrush =
- (IFDE_SolidBrush*)IFDE_Brush::Create(FDE_BRUSHTYPE_Solid);
+ IFDE_SolidBrush* pBrush = new CFDE_SolidBrush;
pBrush->SetColor(m_TxtColor);
IFDE_Pen* pPen = NULL;
FDE_HDEVICESTATE hDev = m_pRenderDevice->SaveState();
@@ -1017,7 +1017,7 @@ void CFDE_TextOut::DrawLine(const FDE_LPTTOPIECE pPiece, IFDE_Pen*& pPen) {
return;
}
if (pPen == NULL) {
- pPen = IFDE_Pen::Create();
+ pPen = new CFDE_Pen;
pPen->SetColor(m_TxtColor);
}
IFDE_Path* pPath = IFDE_Path::Create();
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 15625f2998..a15fb95925 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -10,6 +10,7 @@
#include "core/fxcrt/include/fx_ext.h"
#include "xfa/fde/css/fde_csscache.h"
+#include "xfa/fde/fde_object.h"
#include "xfa/fde/fde_pen.h"
#include "xfa/fde/xml/fde_xml_imp.h"
#include "xfa/fgas/crt/fgas_algorithm.h"
@@ -1222,12 +1223,10 @@ FX_BOOL CXFA_TextLayout::DrawString(CFX_RenderDevice* pFxDevice,
}
FDE_HDEVICESTATE state = pDevice->SaveState();
pDevice->SetClipRect(rtClip);
- IFDE_SolidBrush* pSolidBrush =
- (IFDE_SolidBrush*)IFDE_Brush::Create(FDE_BRUSHTYPE_Solid);
- IFDE_Pen* pPen = IFDE_Pen::Create();
+ IFDE_SolidBrush* pSolidBrush = new CFDE_SolidBrush;
+ IFDE_Pen* pPen = new CFDE_Pen;
FXSYS_assert(pDevice);
- FXSYS_assert(pSolidBrush);
- FXSYS_assert(pPen);
+
if (m_pieceLines.GetSize() == 0) {
int32_t iBlockCount = CountBlocks();
for (int32_t i = 0; i < iBlockCount; i++) {