summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_monthcalendartp.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-07 16:36:39 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-08 01:36:02 +0000
commitbba2a7cf30da9e84bcc14ef32dbb0bb944229219 (patch)
tree94a74de8d07b3e395bf6e08a62811a3a0d652d19 /xfa/fwl/theme/cfwl_monthcalendartp.cpp
parent55e026b7b6eec17b012c819c4a7d39e63094b5c4 (diff)
downloadpdfium-bba2a7cf30da9e84bcc14ef32dbb0bb944229219.tar.xz
Update to use CFX_Rect{F} and CFX_Matrix constructors.
This Cl updates the code to use the constructors instead of creating an empty object and calling Set(). It also removes the various memsets of the CFX_Rect{F} classes. Change-Id: I6e20cec00866a38372858dcba5a30d31103172e4 Reviewed-on: https://pdfium-review.googlesource.com/2550 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fwl/theme/cfwl_monthcalendartp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_monthcalendartp.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
index d98cf24f85..476135fa44 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
@@ -132,8 +132,7 @@ void CFWL_MonthCalendarTP::DrawLButton(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
- CFX_RectF rtLBtn;
- rtLBtn = pParams->m_rtPart;
+ CFX_RectF rtLBtn = pParams->m_rtPart;
path.AddRectangle(rtLBtn.left, rtLBtn.top, rtLBtn.width, rtLBtn.height);
pParams->m_pGraphics->SaveGraphState();
CFX_Color clrLBtnEdge(ArgbEncode(0xff, 205, 219, 243));
@@ -164,8 +163,7 @@ void CFWL_MonthCalendarTP::DrawRButton(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
- CFX_RectF rtRBtn;
- rtRBtn = pParams->m_rtPart;
+ CFX_RectF rtRBtn = pParams->m_rtPart;
path.AddRectangle(rtRBtn.left, rtRBtn.top, rtRBtn.width, rtRBtn.height);
pParams->m_pGraphics->SaveGraphState();
CFX_Color clrRBtnEdge(ArgbEncode(0xff, 205, 219, 243));
@@ -196,8 +194,7 @@ void CFWL_MonthCalendarTP::DrawHSeperator(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
- CFX_RectF rtHSep;
- rtHSep = pParams->m_rtPart;
+ CFX_RectF rtHSep = pParams->m_rtPart;
path.MoveTo(rtHSep.left, rtHSep.top + rtHSep.height / 2);
path.LineTo(rtHSep.right(), rtHSep.top + rtHSep.height / 2);
pParams->m_pGraphics->SaveGraphState();
@@ -211,8 +208,7 @@ void CFWL_MonthCalendarTP::DrawWeekNumSep(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
- CFX_RectF rtWeekSep;
- rtWeekSep = pParams->m_rtPart;
+ CFX_RectF rtWeekSep = pParams->m_rtPart;
path.MoveTo(rtWeekSep.left, rtWeekSep.top);
path.LineTo(rtWeekSep.left, rtWeekSep.bottom());
pParams->m_pGraphics->SaveGraphState();
@@ -228,8 +224,7 @@ void CFWL_MonthCalendarTP::DrawDatesInBK(CFWL_ThemeBackground* pParams,
if (pParams->m_dwStates & CFWL_PartState_Selected) {
CFX_Path path;
path.Create();
- CFX_RectF rtSelDay;
- rtSelDay = pParams->m_rtPart;
+ CFX_RectF rtSelDay = pParams->m_rtPart;
path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
rtSelDay.height);
CFX_Color clrSelDayBK(m_pThemeData->clrDatesSelectedBK);
@@ -238,8 +233,7 @@ void CFWL_MonthCalendarTP::DrawDatesInBK(CFWL_ThemeBackground* pParams,
} else if (pParams->m_dwStates & CFWL_PartState_Hovered) {
CFX_Path path;
path.Create();
- CFX_RectF rtSelDay;
- rtSelDay = pParams->m_rtPart;
+ CFX_RectF rtSelDay = pParams->m_rtPart;
path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
rtSelDay.height);
CFX_Color clrSelDayBK(m_pThemeData->clrDatesHoverBK);
@@ -253,8 +247,7 @@ void CFWL_MonthCalendarTP::DrawDatesInCircle(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
- CFX_RectF rtSelDay;
- rtSelDay = pParams->m_rtPart;
+ CFX_RectF rtSelDay = pParams->m_rtPart;
path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
rtSelDay.height);
pParams->m_pGraphics->SaveGraphState();
@@ -268,8 +261,7 @@ void CFWL_MonthCalendarTP::DrawTodayCircle(CFWL_ThemeBackground* pParams,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
- CFX_RectF rtTodayCircle;
- rtTodayCircle = pParams->m_rtPart;
+ CFX_RectF rtTodayCircle = pParams->m_rtPart;
path.AddRectangle(rtTodayCircle.left, rtTodayCircle.top, rtTodayCircle.width,
rtTodayCircle.height);
pParams->m_pGraphics->SaveGraphState();