I just realized that there needs to be a new function called wx.DesktopDC
Since all bitmaps’ upper-left coordinate is always (0, 0) there also needs to be an easy way to apply the “screenToBitmap” offset. If there was available the desktop’s rect tuple then this offset would be defined as:
screenToBitmapOffset = (desktopRect[0], desktopRect[1])
and
desktopOrigin = (desktopRect[2], desktopRect[3])
Since DC bitmap ordinate values can only be positive, but the MSW function allows negative position ordinates for blit source DC ordinates such as :
---- desktopScreenRectList (originX, originY, sizeX, sizeY) =
(0, 0, 1280, 800)
(0, -800, 1280, 0)
---- Desktop Rect = (originX, originY, sizeX, sizeY) =
(0, -800, 1280, 800)
blitWriteToStartCoord = (0, 0) # Origin (upper-left corner) of the destination bitmap.
bltSize = (sizeX, sizeY)
---- BitBlt() args :
blitWriteToStartCoord (0, 0)
bltSize (1280, 1600)
blitReadFromStartCoord (0, -800) # <----------------------------------------------
desktopBmapDC.BitBlt( blitWriteToStartCoord, bltSize, # Dest'n args
desktopDC, blitReadFromStartCoord, win32con.SRCCOPY ) # Source args.
Ray Pasco