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 /core/fxge/cfx_graphstate.cpp | |
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 'core/fxge/cfx_graphstate.cpp')
-rw-r--r-- | core/fxge/cfx_graphstate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxge/cfx_graphstate.cpp b/core/fxge/cfx_graphstate.cpp index ad6b5fc6c7..919faa39c6 100644 --- a/core/fxge/cfx_graphstate.cpp +++ b/core/fxge/cfx_graphstate.cpp @@ -22,7 +22,7 @@ void CFX_GraphState::Emplace() { void CFX_GraphState::SetLineDash(CPDF_Array* pArray, float phase, float scale) { CFX_GraphStateData* pData = m_Ref.GetPrivateCopy(); pData->m_DashPhase = phase * scale; - pData->SetDashCount(static_cast<int>(pArray->GetCount())); + pData->m_DashArray.resize(pArray->GetCount()); for (size_t i = 0; i < pArray->GetCount(); i++) pData->m_DashArray[i] = pArray->GetNumberAt(i) * scale; } |