|
-
Jun 25th, 2002, 11:48 PM
#1
Thread Starter
PowerPoster
Zoom IN/OUT
How can i have s fine zoom in/out of a raster image? as i found that the StretchBlt will return a poor output.
-
Jun 29th, 2002, 12:49 PM
#2
Lively Member
stretchblt is the only easy way i can think of.
if you want you could do it like this. say you zoom in 600%. you could make another picture 3 times as big. then, for every 1 pixel, you have in the original, paint 9 pixels (3*3).
then when your zooming out, you need to take every third pixel in the stretched image and write it to another pixture box.
if you need me to clarify, just tell me
-
Jun 29th, 2002, 05:42 PM
#3
Frenzied Member
look at www.ur.co.nz you can download code from a tutorial there that does the exact thing you are asking for
Sanity is a full time job
Puh das war harter Stoff!
-
Jun 29th, 2002, 06:56 PM
#4
PowerPoster
Well
Not a gamer but
VB Code:
picdest.PaintPicture picSource.Picture, 0, 0, _
picSource.ScaleWidth * ZoomFactor, picSource.ScaleHeight * ZoomFactor
Is this at all what you are looking for?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Jun 30th, 2002, 02:30 AM
#5
Frenzied Member
haah true that works
Gamers always forget about this since you stop using those functions as soon as you understand bit blt...
Sanity is a full time job
Puh das war harter Stoff!
-
Jun 30th, 2002, 08:26 AM
#6
PowerPoster
Well
So this solves the problem?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Jun 30th, 2002, 09:23 AM
#7
Thread Starter
PowerPoster
Thx you guy 
Oops... I'm coding in eVC for WindowCe platforms. So i can't use any VB code. In eVC, I only manage to find out the SetViewportOrgEx and SetViewportExtEx but not the others two SetWindowExtEx and SetWindowOrgEx. That why i lost the ScaleWidth and ScaleHeight capability in eVC.
As for the link, I will check ut out later.
regards,
-
Aug 24th, 2004, 10:44 PM
#8
Hyperactive Member
Re: Well
Originally posted by James Stanich
Not a gamer but
VB Code:
picdest.PaintPicture picSource.Picture, 0, 0, _
picSource.ScaleWidth * ZoomFactor, picSource.ScaleHeight * ZoomFactor
Is this at all what you are looking for?
picdest, picsource, and zoomfactor. Can I use these in VB.NET and what imports should I use?
I'm not very familiar with stretch blt, so if that is the way can you give me some detail~
edit: How would I go about having a click event zoom? (left click zoom in, right click zoom out)
-
Aug 25th, 2004, 05:56 AM
#9
Ex-Super Mod'rater
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
Aug 25th, 2004, 01:31 PM
#10
Hyperactive Member
lol. do now~
You think you can help me though? I need a click effect zoom on a picture...like a map
-
Aug 26th, 2004, 07:10 AM
#11
Ex-Super Mod'rater
Yea I'm not totally sure what you mean your after though?
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
Aug 26th, 2004, 02:35 PM
#12
Hyperactive Member
-
Aug 27th, 2004, 05:45 PM
#13
Hyperactive Member
It may be solved with that, but I want to learn code. I got scrolling to work with me. Now I need the zoom capability. I don't think BitBLT works really good with VB.NET or it takes more complicated coding than what I know. Is there a way to use the System.Drawing reference to zoom?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|