Application that zooms to a specific part of the desktop

Go To StackoverFlow.com

0

I want (primarily for didactic purposes) to create a linux application which should allow the user to select a rectangle on the screen (whatever window lies within that region) and zoom it on the screen.

Where should I start? I already did something similar on windows using C# (basically I took a snapshot of the region and zoomed it with the Image control) but on linux I don't know where to start.

I was thinking about using QT for the main window, maybe openGL with Qt but I need information whether this approach may be right and some start-up tip to get started. Is using QT and openGL a good way to do this? What api/functionality should I use to draw on the screen and copy a specific region of it (and zooming it) ?

2012-04-03 20:23
by paulAl
What did you use under windows - Jon Cage 2012-04-03 20:37
what do you mean? I wrote I used C# and took a snapshot of the region I wanted (CopyFromScreen - paulAl 2012-04-03 20:58
When you say you took a snapshot, you mean you hit print screen and pasted it into an image control which enlarges the image? Or there's some windows API calls you're making? Basically I was wondering if there's any reason you can't do the same thing on Linux as you do under Windows using mono... - Jon Cage 2012-04-03 21:45
FYI, there are already screen magnifier apps out there for Linux: http://magnifier.sourceforge.net - Jon Cage 2012-04-04 08:28


1

I think going with Qt is a good idea. Perhaps a good start could be the Qt screenshot example. Then creating a simple QApplication to display the zoomed part according to the mouse position should be way feasible, even for a first Qt project !

I really recommend you to use QtCreator to develop on linux it's a really great IDE.

2012-04-04 19:48
by vrince
I did it, and with QT it was a piece of cake. Thank you - paulAl 2012-04-04 20:32


0

How about using Mono to port your c# code to Linux? There's quite a few options for GUI toolkits and you may be able to reuse some code from your Windows app.

2012-04-03 20:27
by Jon Cage
It uses windows-specific functions and as I wrote I want to do this natively in linux, I don't want to use Java but just plain C/C+ - paulAl 2012-04-03 20:57
Mono has nothing to do with Java: http://www.mono-project.com/WhatisMon - Jon Cage 2012-04-03 21:46
Ads