|
-
April 11th, 2001, 06:44 AM
#1
Zooming
I am creating a page preview sort of application.
I am using picture box in that.I want to provide zooming in and zooming out facility for it.Please send me your suggestions about how can I do it? I want text and lines on the document to be zoomed in and out.
Also please suggest if I can use some other object to have this effect.
-
April 11th, 2001, 07:11 AM
#2
Re: Zooming
If you can use imagebox do display picture, it will be easy to zoom in and out changing the stretch porperty to true and then enlarging and restricting size of imagebox.
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
April 11th, 2001, 07:54 AM
#3
Re: Zooming
If it is just text and lines in your document, you are well off redrawing everything in the new scale. This will retain the quality of your output, but at the cost of speed.
If you use raster shrinking and expansion(using StretchBlt()), the application response will be fast, but your image will lose quality. There are methods that enable you to enhance your output(for example, use SetStretchBltMode()with the STRETCH_ANDSCANS parameter to retain black pixels at the cost of white.)
Still another method exists that retains the speed of raster operations and with acceptable quality. That is antialiasing. If you have noted in Adobe Acrobat, the fonts seem so smooth. But if you zoom in (for example, take a sanpshot, paste it in MSPaint and view in Large size), you will see certain shades of gray around the character. This is the technique of antialiasing.
Are you conversant with C++? If so, there is a code that does this in
http://www.codeguru.com/bitmap/bitmapShrinking.shtml
You can take the code, make a DLL and call it from VB. This gives you the shrinked bitmap with antialiasing.
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
|