Original Post
you know that windows screensaver that looks like theres a magnifying glass over your screen and it moves around, i think its called something like the "lens effect" or whatever.
i read a tutorial on it once that said it was just a square that each pixel was pre-calculated of what pixel it would be underneath it. (i hope im making sense).
well, this is all good and fine, but i wanted to create something similar to it in my game. they said they precalculated theirs using sin() and whatever. well, i wanted to create one, but instead of a filled-in-circle, i wanted a circle thats not filled in. ex: just the outline of the circle is the "magnifying glass".
anybody know how to go about doing this?
oh, and the only way i could think of drawing such a thing would be to copy whatever is underneath our potential lens to a bitmap of the same size. then when you draw the "lens" you could do something like:
// *under[..] is bitmap of whats underneath
// *new[..] is whats going to be drawn in its place
// *lens[..] contains the index from "under" to be put in "new"
for ( i = 0; i < WHATEVER_SIZE; i++ )
{
new = under[ lens[ i ] ];
}
would that be the best way to go about it? (besides drawing to the actual screen instead of to "new" then to the screen.)
thanx
- jeremiah
http://fakemind.com