| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |