A question...

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
User avatar
anykey
Extreme Poster
Posts: 420
Joined: Mon 31 Jan, 2005 3:36 am
Location: In the matrix
Contact:

A question...

Post by anykey »

My compsci teacher was telling us about things kids in his class have done. One of the apparently flipped the monitor. How could a program do that?
I imagine it involves making the program fullscreen and capturing an image of the screen before doing so. They could probably transform that image into an array and rotate and display it.
This would be done with Java, since that's the language the class uses.
I think, therefore iMac
Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Uhm... remap the screen and recompile the video driver? Oh, wait, no open source on Windows... :)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

I don't know of a way to screen shot, but you can rotate with AffineTransform.
Image
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

That's not fast enough if you always do it to the whole screen. If only the areas that really changed are updated (i. e. most of the time the cursor only), it might be possible.
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

You could just go into the video driver's control panel and select one of the rotation options. ;)
Some drivers use Ctrl+Alt+Shift+Cursor Key mapped as the default shortcut.

'No open source on Windows' <- wth?
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

CoBB: and you can, with the drawImage() method.
Image
User avatar
Dwedit
Maxcoderz Staff
Posts: 579
Joined: Wed 15 Dec, 2004 6:06 am
Location: Chicago!
Contact:

Post by Dwedit »

Some display drivers let you change the screen rotation, but I don't know if anything like that is going on.
You know your hexadecimal output routine is broken when it displays the character 'G'.
ssartell
Regular Member
Posts: 76
Joined: Fri 02 Dec, 2005 5:39 pm

Post by ssartell »

I just can't imagine this being a useful endeavor.
KevinJB
Calc Wizard
Posts: 501
Joined: Sat 28 May, 2005 5:34 am
Location: Chesapeake, Virginia
Contact:

Post by KevinJB »

Of course not, it's just for fun.
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
KevinJB | RevSoft
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

benryves wrote:'No open source on Windows' <- wth?
Eeh... yes... sorry for that, I had been drinking a couple of beers that night ;) My point was that video card drivers for Windows usually aren't open source, and that therefor you can't just alter them a bit to flip the screen and recompile them :)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
anykey
Extreme Poster
Posts: 420
Joined: Mon 31 Jan, 2005 3:36 am
Location: In the matrix
Contact:

Post by anykey »

benryves wrote:You could just go into the video driver's control panel and select one of the rotation options. ;)
Some drivers use Ctrl+Alt+Shift+Cursor Key mapped as the default shortcut.

'No open source on Windows' <- wth?
I can't do anything that involves changing settings, since these are school computers.
I think, therefore iMac
Image
User avatar
anykey
Extreme Poster
Posts: 420
Joined: Mon 31 Jan, 2005 3:36 am
Location: In the matrix
Contact:

Post by anykey »

Aha! I found out how to do it: Robot.createScreenCapture();
I see some potential for fun pranks using that class...

How would I rotate the bufferedimage? I have very little experience with low level graphics.
I think, therefore iMac
Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

AffineTransform class, but I am sure there is a lot of other ways too. This will help: once you rotate it, store that image because calculating the rotation will eat up time.
Image
User avatar
anykey
Extreme Poster
Posts: 420
Joined: Mon 31 Jan, 2005 3:36 am
Location: In the matrix
Contact:

Post by anykey »

Okay. Thanks!
You'd think the Image class would have some features for that...
I think, therefore iMac
Image
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

anykey wrote: I can't do anything that involves changing settings, since these are school computers.
programs can do ANYthing you want them to do, it just takes more time and code to make it work
and with school computers it usually isnt all that hard.. its just school afterall, i got the school's server to think im an administrator and messed around a bit
you can even kill most of those computers with simle batch files or starting up in safe-mode, restart in dos mode, format the hidden partition used by Illusion for the backup copy, restart in normal mode, and start messing around..
(although you could have a program kill Illusion or go around it and directly edit setting/memory)

just assuming yout school has Illusion installed and that they're clever enough to put it on a hidden partition..
Post Reply