summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-15 19:27:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-15 19:27:17 +0000
commit7d75650672a848428aaadb603b2814d33dfb479f (patch)
tree508d0c992231aa1a5faad16d7ebe1bf1c44c4d78 /fpdfsdk
parent35841fa4e3dbf8f9146f78def048c4a287894a8a (diff)
downloadpdfium-7d75650672a848428aaadb603b2814d33dfb479f.tar.xz
Add a CFX_PathData::AppendRect() variant.chromium/3372
One that takes a CFX_FloatRect instead of LBRT floats. Use it where appropriate. Change-Id: I8ba19e86c61c91d8b4ef685b5cb65c8fb717f013 Reviewed-on: https://pdfium-review.googlesource.com/28581 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 20189ef4d6..0d765ed947 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -679,16 +679,11 @@ void CPDFSDK_Widget::DrawAppearance(CFX_RenderDevice* pDevice,
fieldType == FormFieldType::kRadioButton) &&
mode == CPDF_Annot::Normal &&
!IsWidgetAppearanceValid(CPDF_Annot::Normal)) {
- CFX_PathData pathData;
-
- CFX_FloatRect rcAnnot = GetRect();
-
- pathData.AppendRect(rcAnnot.left, rcAnnot.bottom, rcAnnot.right,
- rcAnnot.top);
-
CFX_GraphStateData gsd;
gsd.m_LineWidth = 0.0f;
+ CFX_PathData pathData;
+ pathData.AppendRect(GetRect());
pDevice->DrawPath(&pathData, &mtUser2Device, &gsd, 0, 0xFFAAAAAA,
FXFILL_ALTERNATE);
} else {