Further on the way to making the colour dropper work on OS X. Now the screen bitmap is captured correctly, but still not drawn correctly.

Updates #748.

Originally committed to SVN as r3996.
This commit is contained in:
Niels Martin Hansen 2010-01-19 05:44:18 +00:00
parent f3731231ea
commit ed100153ff
1 changed files with 7 additions and 3 deletions

View File

@ -417,14 +417,18 @@ void ColorPickerScreenDropper::OnPaint(wxPaintEvent &evt)
void ColorPickerScreenDropper::DropFromScreenXY(int x, int y)
{
wxMemoryDC capdc;
capdc.SelectObject(capture);
wxMemoryDC capdc(capture);
wxScreenDC screen;
#ifdef __WXMAC__
wxBitmap &screenbmp = screen.GetAsBitmap().GetSubBitmap(wxRect(x-resx/2, y-resy/2, resx, resy));
capdc.DrawBitmap(screenbmp, 0, 0);
#else
screen.StartDrawingOnTop();
capdc.Blit(0, 0, resx, resy, &screen, x-resx/2, y-resy/2);
screen.EndDrawingOnTop();
#endif
Refresh(false);
}