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_fffield.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_fffield.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_fffield.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp index e009ed6caa..c1c2c11d6f 100644 --- a/xfa/fxfa/cxfa_fffield.cpp +++ b/xfa/fxfa/cxfa_fffield.cpp @@ -92,8 +92,8 @@ void CXFA_FFField::DrawHighlight(CXFA_Graphics* pGS, } CXFA_FFDoc* pDoc = GetDoc(); - CXFA_Color crHighlight(pDoc->GetDocEnvironment()->GetHighlightColor(pDoc)); - pGS->SetFillColor(&crHighlight); + pGS->SetFillColor( + CXFA_Color(pDoc->GetDocEnvironment()->GetHighlightColor(pDoc))); CXFA_Path path; if (bEllipse) path.AddEllipse(m_rtUI); @@ -107,8 +107,7 @@ void CXFA_FFField::DrawFocus(CXFA_Graphics* pGS, CFX_Matrix* pMatrix) { if (!(m_dwStatus & XFA_WidgetStatus_Focused)) return; - CXFA_Color cr(0xFF000000); - pGS->SetStrokeColor(&cr); + pGS->SetStrokeColor(CXFA_Color(0xFF000000)); float DashPattern[2] = {1, 1}; pGS->SetLineDash(0.0f, DashPattern, 2); |