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

Side by Side Diff: xfa/fwl/cfwl_picturebox.cpp

Issue 2560873005: Cleanup CFWL_Widget code to return CFX_RectFs where appropriate (Closed)
Patch Set: Review feedback Created 4 years 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 | « xfa/fwl/cfwl_monthcalendar.cpp ('k') | xfa/fwl/cfwl_pushbutton.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/cfwl_picturebox.h" 7 #include "xfa/fwl/cfwl_picturebox.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 11 matching lines...) Expand all
22 FWL_Type CFWL_PictureBox::GetClassID() const { 22 FWL_Type CFWL_PictureBox::GetClassID() const {
23 return FWL_Type::PictureBox; 23 return FWL_Type::PictureBox;
24 } 24 }
25 25
26 void CFWL_PictureBox::Update() { 26 void CFWL_PictureBox::Update() {
27 if (IsLocked()) 27 if (IsLocked())
28 return; 28 return;
29 if (!m_pProperties->m_pThemeProvider) 29 if (!m_pProperties->m_pThemeProvider)
30 m_pProperties->m_pThemeProvider = GetAvailableTheme(); 30 m_pProperties->m_pThemeProvider = GetAvailableTheme();
31 31
32 GetClientRect(m_rtClient); 32 m_rtClient = GetClientRect();
33 } 33 }
34 34
35 void CFWL_PictureBox::DrawWidget(CFX_Graphics* pGraphics, 35 void CFWL_PictureBox::DrawWidget(CFX_Graphics* pGraphics,
36 const CFX_Matrix* pMatrix) { 36 const CFX_Matrix* pMatrix) {
37 if (!pGraphics) 37 if (!pGraphics)
38 return; 38 return;
39 if (!m_pProperties->m_pThemeProvider) 39 if (!m_pProperties->m_pThemeProvider)
40 return; 40 return;
41 41
42 IFWL_ThemeProvider* pTheme = GetAvailableTheme(); 42 IFWL_ThemeProvider* pTheme = GetAvailableTheme();
43 if (HasBorder()) 43 if (HasBorder())
44 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); 44 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
45 if (HasEdge()) 45 if (HasEdge())
46 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); 46 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix);
47 } 47 }
48 48
49 void CFWL_PictureBox::OnDrawWidget(CFX_Graphics* pGraphics, 49 void CFWL_PictureBox::OnDrawWidget(CFX_Graphics* pGraphics,
50 const CFX_Matrix* pMatrix) { 50 const CFX_Matrix* pMatrix) {
51 DrawWidget(pGraphics, pMatrix); 51 DrawWidget(pGraphics, pMatrix);
52 } 52 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_monthcalendar.cpp ('k') | xfa/fwl/cfwl_pushbutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698