summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp3
-rw-r--r--fpdfsdk/pwl/cpwl_edit.cpp10
2 files changed, 5 insertions, 8 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index 7feda490ba..d76ce99578 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -86,8 +86,7 @@ void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView,
false);
CFX_GraphStateData gsd;
- gsd.SetDashCount(1);
- gsd.m_DashArray[0] = 1.0f;
+ gsd.m_DashArray = {1.0f};
gsd.m_DashPhase = 0;
gsd.m_LineWidth = 1.0f;
pDevice->DrawPath(&path, pUser2Device, &gsd, 0, ArgbEncode(255, 0, 0, 0),
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp
index c4ff2f4bd4..4cd238b679 100644
--- a/fpdfsdk/pwl/cpwl_edit.cpp
+++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -201,12 +201,10 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice,
}
case BorderStyle::DASH: {
CFX_GraphStateData gsd;
- gsd.m_LineWidth = (float)GetBorderWidth();
-
- gsd.SetDashCount(2);
- gsd.m_DashArray[0] = (float)GetBorderDash().nDash;
- gsd.m_DashArray[1] = (float)GetBorderDash().nGap;
- gsd.m_DashPhase = (float)GetBorderDash().nPhase;
+ gsd.m_LineWidth = static_cast<float>(GetBorderWidth());
+ gsd.m_DashArray = {static_cast<float>(GetBorderDash().nDash),
+ static_cast<float>(GetBorderDash().nGap)};
+ gsd.m_DashPhase = static_cast<float>(GetBorderDash().nPhase);
CFX_PathData path;
for (int32_t i = 0; i < nCharArray - 1; i++) {