Background
I'm developing an application for desktop computers that needs to magnify the current desktop programmatically. It must only display the magnified area.
The language being used is C++, and I'm currently running Ubuntu, but in the future it will work for other platforms.
Current Approach
For the current approach, a Rendering Window (RW) is used . For each rendering iterationg, it is first minimized, and the desktop image is acquired (screenshot) via XGetImage (X11):
XImage *image = XGetImage(xDisplay, RootWindow(xDisplay, DefaultScreen(xDisplay)), 0, 0, screenWidth, screenHeight, AllPlanes, ZPixmap);
The image is then processed in order to provide zoom area, and the RW is maximized and rendered.
This approach, even without the zoom processing, takes long due to the minimization and maximization processes, and does not allow real time execution.
Question
How can one render a real time magnified version of the current desktop?
Zooming libraries can be suggested, but they must be efficient, that is, must not consume much processing, and allow full zoom area control via code, that is, it must NOT require a mouse/keyboard.
Special Notes
As the main focus for this app is Linux compatibility, answers regarding Windows will be appreciated (like a how-to of the Magnification-API), but not accepted as correct answer.