diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-08-16 15:09:00 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-16 22:54:39 +0000 |
commit | 574015e0ad53c592fe8a923390b31edeb30c41fe (patch) | |
tree | a3774207ebb4c1fc5b5abfb90a32adf974f76a10 /xfa/fxfa/cxfa_ffpushbutton.cpp | |
parent | a364729be3725adbc9689c1c8c23902df102243b (diff) | |
download | pdfium-574015e0ad53c592fe8a923390b31edeb30c41fe.tar.xz |
Tidy CXFA_Color class and argument passing.
Remove friendship.
De-virtualize.
Nest enum inside class.
Make copy-assignable and pass by const ref.
Make pack better on 64-bits.
Change-Id: I1ae3b6d03756fa5780e9023795db6648e8b8299a
Reviewed-on: https://pdfium-review.googlesource.com/11290
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffpushbutton.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffpushbutton.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp index 17c1b9f8c8..91b6f3ff27 100644 --- a/xfa/fxfa/cxfa_ffpushbutton.cpp +++ b/xfa/fxfa/cxfa_ffpushbutton.cpp @@ -212,11 +212,9 @@ void CXFA_FFPushButton::OnDrawWidget(CXFA_Graphics* pGraphics, CFX_RectF rtFill(0, 0, m_pNormalWidget->GetWidgetRect().Size()); float fLineWith = GetLineWidth(); rtFill.Deflate(fLineWith, fLineWith); - CXFA_Color cr(FXARGB_MAKE(128, 128, 255, 255)); - pGraphics->SetFillColor(&cr); - CXFA_Path path; path.AddRectangle(rtFill.left, rtFill.top, rtFill.width, rtFill.height); + pGraphics->SetFillColor(CXFA_Color(FXARGB_MAKE(128, 128, 255, 255))); pGraphics->FillPath(&path, FXFILL_WINDING, (CFX_Matrix*)pMatrix); } return; @@ -226,8 +224,7 @@ void CXFA_FFPushButton::OnDrawWidget(CXFA_Graphics* pGraphics, if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) && (m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) { float fLineWidth = GetLineWidth(); - CXFA_Color cr(FXARGB_MAKE(255, 128, 255, 255)); - pGraphics->SetStrokeColor(&cr); + pGraphics->SetStrokeColor(CXFA_Color(FXARGB_MAKE(255, 128, 255, 255))); pGraphics->SetLineWidth(fLineWidth); CXFA_Path path; |