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

Unified Diff: xfa/fwl/core/ifwl_picturebox.cpp

Issue 2498163002: Cleanup cfwl_* files. (Closed)
Patch Set: Review feedback Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_picturebox.h ('k') | xfa/fwl/core/ifwl_pushbutton.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_picturebox.cpp
diff --git a/xfa/fwl/core/ifwl_picturebox.cpp b/xfa/fwl/core/ifwl_picturebox.cpp
index b7a4c611182d1831b3ef46981786d00f48a99e67..19db6f59fa189b58f9a9633f0803596448f86c92 100644
--- a/xfa/fwl/core/ifwl_picturebox.cpp
+++ b/xfa/fwl/core/ifwl_picturebox.cpp
@@ -30,13 +30,6 @@ void IFWL_PictureBox::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
rect.Set(0, 0, 0, 0);
if (!m_pProperties->m_pDataProvider)
return;
- CFX_DIBitmap* pBitmap =
- static_cast<IFWL_PictureBoxDP*>(m_pProperties->m_pDataProvider)
- ->GetPicture(this);
- if (pBitmap) {
- rect.Set(0, 0, (FX_FLOAT)pBitmap->GetWidth(),
- (FX_FLOAT)pBitmap->GetHeight());
- }
IFWL_Widget::GetWidgetRect(rect, true);
} else {
rect = m_pProperties->m_rtWidget;
@@ -72,29 +65,7 @@ void IFWL_PictureBox::DrawWidget(CFX_Graphics* pGraphics,
void IFWL_PictureBox::DrawBkground(CFX_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme,
const CFX_Matrix* pMatrix) {
- IFWL_PictureBoxDP* pPictureDP =
- static_cast<IFWL_PictureBoxDP*>(m_pProperties->m_pDataProvider);
- if (!pPictureDP)
- return;
-
- CFX_DIBitmap* pPicture = pPictureDP->GetPicture(this);
- CFX_Matrix matrix;
- pPictureDP->GetMatrix(this, matrix);
- if (!pPicture)
- return;
-
- matrix.Concat(*pMatrix);
- FX_FLOAT fx = (FX_FLOAT)pPicture->GetWidth();
- FX_FLOAT fy = (FX_FLOAT)pPicture->GetHeight();
- if (fx > m_rtClient.width) {
- fx = m_rtClient.width;
- }
- if (fy > m_rtClient.height) {
- fy = m_rtClient.height;
- }
- pGraphics->DrawImage(pPicture, CFX_PointF((m_rtClient.width - fx) / 2,
- (m_rtClient.height - fy) / 2),
- &matrix);
+ return;
}
void IFWL_PictureBox::OnDrawWidget(CFX_Graphics* pGraphics,
« no previous file with comments | « xfa/fwl/core/ifwl_picturebox.h ('k') | xfa/fwl/core/ifwl_pushbutton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698