Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: xfa/fwl/theme/cfwl_carettp.cpp

Issue 2263923003: Make CFX_Color constructor explicit (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comment Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | xfa/fwl/theme/cfwl_comboboxtp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/theme/cfwl_carettp.h" 7 #include "xfa/fwl/theme/cfwl_carettp.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_caret.h" 9 #include "xfa/fwl/basewidget/ifwl_caret.h"
10 #include "xfa/fwl/core/cfwl_themebackground.h" 10 #include "xfa/fwl/core/cfwl_themebackground.h"
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 return TRUE; 38 return TRUE;
39 } 39 }
40 void CFWL_CaretTP::DrawCaretBK(CFX_Graphics* pGraphics, 40 void CFWL_CaretTP::DrawCaretBK(CFX_Graphics* pGraphics,
41 uint32_t dwStates, 41 uint32_t dwStates,
42 const CFX_RectF* pRect, 42 const CFX_RectF* pRect,
43 CFX_Color* crFill, 43 CFX_Color* crFill,
44 CFX_Matrix* pMatrix) { 44 CFX_Matrix* pMatrix) {
45 CFX_Path path; 45 CFX_Path path;
46 path.Create(); 46 path.Create();
47 CFX_Color crFilltemp;
48 crFill ? crFilltemp = *crFill : crFilltemp = ArgbEncode(255, 0, 0, 0);
49 CFX_RectF rect = *pRect; 47 CFX_RectF rect = *pRect;
50 path.AddRectangle(rect.left, rect.top, rect.width, rect.height); 48 path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
51 pGraphics->SetFillColor(&crFilltemp); 49 if (crFill) {
50 pGraphics->SetFillColor(crFill);
51 } else {
52 CFX_Color crFilltemp(ArgbEncode(255, 0, 0, 0));
53 pGraphics->SetFillColor(&crFilltemp);
54 }
52 pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix); 55 pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
53 } 56 }
OLDNEW
« no previous file with comments | « no previous file | xfa/fwl/theme/cfwl_comboboxtp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698