From faa9a600f4ee45757039be01acb0865d1bbae957 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 15 Dec 2007 18:26:05 +0000 Subject: [PATCH 1/1] fixed invalid cast of wxWindowDCImpl to wxDC in DoGetPixel() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk1/dcclient.cpp | 2 +- src/motif/dcclient.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index be87f5dd6d..498f19623a 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -444,7 +444,7 @@ bool wxWindowDCImpl::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const wxMemoryDC memdc; wxBitmap bitmap(1, 1); memdc.SelectObject(bitmap); - memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1); + memdc.Blit(0, 0, 1, 1, GetOwner(), x1, y1); memdc.SelectObject(wxNullBitmap); wxImage image = bitmap.ConvertToImage(); diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index 375f968e95..ee4e22a33a 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -236,7 +236,7 @@ bool wxWindowDCImpl::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const wxMemoryDC memdc; wxBitmap bitmap(1, 1); memdc.SelectObject(bitmap); - memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1); + memdc.Blit(0, 0, 1, 1, GetOwner(), x1, y1); memdc.SelectObject(wxNullBitmap); wxImage image = bitmap.ConvertToImage(); col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0)); -- 2.45.2