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

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

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Mac XFA build Created 4 years, 7 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
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_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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 DrawSignBorder( 87 DrawSignBorder(
88 pParams->m_pWidget, pParams->m_pGraphics, &pParams->m_rtPart, 88 pParams->m_pWidget, pParams->m_pGraphics, &pParams->m_rtPart,
89 pParams->m_dwStates & CFWL_PartState_Disabled, &pParams->m_matrix); 89 pParams->m_dwStates & CFWL_PartState_Disabled, &pParams->m_matrix);
90 break; 90 break;
91 } 91 }
92 default: { return FALSE; } 92 default: { return FALSE; }
93 } 93 }
94 return TRUE; 94 return TRUE;
95 } 95 }
96 FWL_ERR CFWL_CheckBoxTP::Initialize() { 96 FWL_Error CFWL_CheckBoxTP::Initialize() {
97 InitTTO(); 97 InitTTO();
98 return CFWL_WidgetTP::Initialize(); 98 return CFWL_WidgetTP::Initialize();
99 } 99 }
100 FWL_ERR CFWL_CheckBoxTP::Finalize() { 100 FWL_Error CFWL_CheckBoxTP::Finalize() {
101 FinalizeTTO(); 101 FinalizeTTO();
102 return CFWL_WidgetTP::Finalize(); 102 return CFWL_WidgetTP::Finalize();
103 } 103 }
104 void CFWL_CheckBoxTP::DrawBoxBk(IFWL_Widget* pWidget, 104 void CFWL_CheckBoxTP::DrawBoxBk(IFWL_Widget* pWidget,
105 CFX_Graphics* pGraphics, 105 CFX_Graphics* pGraphics,
106 const CFX_RectF* pRect, 106 const CFX_RectF* pRect,
107 uint32_t dwStates, 107 uint32_t dwStates,
108 CFX_Matrix* pMatrix) { 108 CFX_Matrix* pMatrix) {
109 dwStates &= 0x03; 109 dwStates &= 0x03;
110 int32_t fillMode = FXFILL_WINDING; 110 int32_t fillMode = FXFILL_WINDING;
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 pt1.x + px2 * FWLTHEME_BEZIER, 498 pt1.x + px2 * FWLTHEME_BEZIER,
499 pt1.y + py2 * FWLTHEME_BEZIER, pt1.x, pt1.y); 499 pt1.y + py2 * FWLTHEME_BEZIER, pt1.x, pt1.y);
500 FX_FLOAT fScale = fCheckLen / CHECKBOX_SIZE_SIGNPATH; 500 FX_FLOAT fScale = fCheckLen / CHECKBOX_SIZE_SIGNPATH;
501 CFX_Matrix mt; 501 CFX_Matrix mt;
502 mt.Set(1, 0, 0, 1, 0, 0); 502 mt.Set(1, 0, 0, 1, 0, 0);
503 mt.Scale(fScale, fScale); 503 mt.Scale(fScale, fScale);
504 CFX_PathData* pData = m_pCheckPath->GetPathData(); 504 CFX_PathData* pData = m_pCheckPath->GetPathData();
505 pData->Transform(&mt); 505 pData->Transform(&mt);
506 } 506 }
507 } 507 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698