diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-09-24 17:55:00 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-09-24 17:55:00 +0000 |
commit | fed6e124109f089a38e24e37b104d983231bee78 (patch) | |
tree | 6c1aa45a97eb27c67611dbe7480bdbcd26710d14 /xfa | |
parent | 97f4483de007c2ff248696f24d34634e0adbf894 (diff) | |
download | pdfium-fed6e124109f089a38e24e37b104d983231bee78.tar.xz |
Give CFX_GraphStateData a work-over.chromium/3561
Use std::vector<float> for dash array.
Use compiler-generated default operations.
Squeeze some enums.
Fix obvious logic botch in DashChanged().
Change-Id: If1d809cc46a3cf2db98a09a3f5a49d22138c0640
Reviewed-on: https://pdfium-review.googlesource.com/42613
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fxgraphics/cxfa_graphics.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxgraphics/cxfa_graphics.cpp b/xfa/fxgraphics/cxfa_graphics.cpp index 628bd44268..03689da618 100644 --- a/xfa/fxgraphics/cxfa_graphics.cpp +++ b/xfa/fxgraphics/cxfa_graphics.cpp @@ -145,14 +145,14 @@ void CXFA_Graphics::SetLineDash(float dashPhase, float scale = m_info.isActOnDash ? m_info.graphState.m_LineWidth : 1.0; m_info.graphState.m_DashPhase = dashPhase; - m_info.graphState.SetDashCount(dashCount); + m_info.graphState.m_DashArray.resize(dashCount); for (size_t i = 0; i < dashCount; i++) m_info.graphState.m_DashArray[i] = dashArray[i] * scale; } void CXFA_Graphics::SetSolidLineDash() { if (m_type == FX_CONTEXT_Device && m_renderDevice) - m_info.graphState.SetDashCount(0); + m_info.graphState.m_DashArray.clear(); } void CXFA_Graphics::SetLineWidth(float lineWidth) { @@ -439,7 +439,7 @@ CXFA_Graphics::TInfo::TInfo(const TInfo& info) fillColor(info.fillColor) {} CXFA_Graphics::TInfo& CXFA_Graphics::TInfo::operator=(const TInfo& other) { - graphState.Copy(other.graphState); + graphState = other.graphState; CTM = other.CTM; isActOnDash = other.isActOnDash; strokeColor = other.strokeColor; |