summaryrefslogtreecommitdiff
path: root/xfa/fxgraphics/cxfa_graphics.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-08-16 15:09:00 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-16 22:54:39 +0000
commit574015e0ad53c592fe8a923390b31edeb30c41fe (patch)
treea3774207ebb4c1fc5b5abfb90a32adf974f76a10 /xfa/fxgraphics/cxfa_graphics.h
parenta364729be3725adbc9689c1c8c23902df102243b (diff)
downloadpdfium-574015e0ad53c592fe8a923390b31edeb30c41fe.tar.xz
Tidy CXFA_Color class and argument passing.
Remove friendship. De-virtualize. Nest enum inside class. Make copy-assignable and pass by const ref. Make pack better on 64-bits. Change-Id: I1ae3b6d03756fa5780e9023795db6648e8b8299a Reviewed-on: https://pdfium-review.googlesource.com/11290 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxgraphics/cxfa_graphics.h')
-rw-r--r--xfa/fxgraphics/cxfa_graphics.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fxgraphics/cxfa_graphics.h b/xfa/fxgraphics/cxfa_graphics.h
index 5492d4d3be..8069c8ecbd 100644
--- a/xfa/fxgraphics/cxfa_graphics.h
+++ b/xfa/fxgraphics/cxfa_graphics.h
@@ -16,8 +16,8 @@
#include "core/fxge/cfx_renderdevice.h"
#include "core/fxge/fx_dib.h"
#include "core/fxge/fx_font.h"
+#include "xfa/fxgraphics/cxfa_color.h"
-class CXFA_Color;
class CXFA_Path;
using FX_FillMode = int32_t;
@@ -57,8 +57,8 @@ class CXFA_Graphics {
void SetLineDash(float dashPhase, float* dashArray, int32_t dashCount);
void SetLineDash(FX_DashStyle dashStyle);
void SetLineWidth(float lineWidth, bool isActOnDash = false);
- void SetStrokeColor(CXFA_Color* color);
- void SetFillColor(CXFA_Color* color);
+ void SetStrokeColor(const CXFA_Color& color);
+ void SetFillColor(const CXFA_Color& color);
void SetClipRect(const CFX_RectF& rect);
void StrokePath(CXFA_Path* path, CFX_Matrix* matrix = nullptr);
void FillPath(CXFA_Path* path,
@@ -81,8 +81,8 @@ class CXFA_Graphics {
CFX_GraphStateData graphState;
CFX_Matrix CTM;
bool isActOnDash;
- CXFA_Color* strokeColor;
- CXFA_Color* fillColor;
+ CXFA_Color strokeColor;
+ CXFA_Color fillColor;
} m_info;
void RenderDeviceSetLineDash(FX_DashStyle dashStyle);