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_checkboxtp.h" | 7 #include "xfa/fwl/theme/cfwl_checkboxtp.h" |
8 | 8 |
9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
10 #include "xfa/fwl/basewidget/ifwl_checkbox.h" | 10 #include "xfa/fwl/basewidget/ifwl_checkbox.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 DrawSignBorder( | 92 DrawSignBorder( |
93 pParams->m_pWidget, pParams->m_pGraphics, &pParams->m_rtPart, | 93 pParams->m_pWidget, pParams->m_pGraphics, &pParams->m_rtPart, |
94 pParams->m_dwStates & CFWL_PartState_Disabled, &pParams->m_matrix); | 94 pParams->m_dwStates & CFWL_PartState_Disabled, &pParams->m_matrix); |
95 break; | 95 break; |
96 } | 96 } |
97 default: { return FALSE; } | 97 default: { return FALSE; } |
98 } | 98 } |
99 return TRUE; | 99 return TRUE; |
100 } | 100 } |
101 FWL_ERR CFWL_CheckBoxTP::Initialize() { | 101 FWL_Error CFWL_CheckBoxTP::Initialize() { |
102 InitTTO(); | 102 InitTTO(); |
103 return CFWL_WidgetTP::Initialize(); | 103 return CFWL_WidgetTP::Initialize(); |
104 } | 104 } |
105 FWL_ERR CFWL_CheckBoxTP::Finalize() { | 105 FWL_Error CFWL_CheckBoxTP::Finalize() { |
106 FinalizeTTO(); | 106 FinalizeTTO(); |
107 return CFWL_WidgetTP::Finalize(); | 107 return CFWL_WidgetTP::Finalize(); |
108 } | 108 } |
109 void CFWL_CheckBoxTP::DrawBoxBk(IFWL_Widget* pWidget, | 109 void CFWL_CheckBoxTP::DrawBoxBk(IFWL_Widget* pWidget, |
110 CFX_Graphics* pGraphics, | 110 CFX_Graphics* pGraphics, |
111 const CFX_RectF* pRect, | 111 const CFX_RectF* pRect, |
112 uint32_t dwStates, | 112 uint32_t dwStates, |
113 CFX_Matrix* pMatrix) { | 113 CFX_Matrix* pMatrix) { |
114 dwStates &= 0x03; | 114 dwStates &= 0x03; |
115 int32_t fillMode = FXFILL_WINDING; | 115 int32_t fillMode = FXFILL_WINDING; |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 pt1.x + px2 * FX_BEZIER, pt1.y + py2 * FX_BEZIER, | 496 pt1.x + px2 * FX_BEZIER, pt1.y + py2 * FX_BEZIER, |
497 pt1.x, pt1.y); | 497 pt1.x, pt1.y); |
498 FX_FLOAT fScale = fCheckLen / kSignPath; | 498 FX_FLOAT fScale = fCheckLen / kSignPath; |
499 CFX_Matrix mt; | 499 CFX_Matrix mt; |
500 mt.Set(1, 0, 0, 1, 0, 0); | 500 mt.Set(1, 0, 0, 1, 0, 0); |
501 mt.Scale(fScale, fScale); | 501 mt.Scale(fScale, fScale); |
502 CFX_PathData* pData = m_pCheckPath->GetPathData(); | 502 CFX_PathData* pData = m_pCheckPath->GetPathData(); |
503 pData->Transform(&mt); | 503 pData->Transform(&mt); |
504 } | 504 } |
505 } | 505 } |
OLD | NEW |