X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f469b27cacd2b167397917fcf9df1df23751b9be..2e4df4bfaf214faac6d4c7519f4aab5b8c7fd287:/src/gtk1/dcclient.cpp diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 62924c7ca7..b5d5c58a91 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -415,6 +415,7 @@ bool wxWindowDC::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const memdc.SelectObject(bitmap); memdc.Blit(0, 0, 1, 1, (wxDC*) this, x1, y1); memdc.SelectObject(wxNullBitmap); + wxImage image(bitmap); col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0)); return TRUE; @@ -2040,7 +2041,7 @@ void wxWindowDC::ComputeScaleAndOrigin() // Resolution in pixels per logical inch wxSize wxWindowDC::GetPPI() const { - return wxSize(100, 100); + return wxSize(m_mm_to_pix_x * 25.4 + 0.5, m_mm_to_pix_y * 25.4 + 0.5); } int wxWindowDC::GetDepth() const @@ -2262,7 +2263,7 @@ void wxClientDC::DoGetSize(int *width, int *height) const { wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") ); - m_owner->GetClientSize( &width, &height ); + m_owner->GetClientSize( width, height ); } // ----------------------------------------------------------------------------