Re: Graphics in Win32lib
- Posted by mistertrik at hotmail.com Oct 10, 2002
- 467 views
Thank you, that worked fine. >From: tone.skoda at gmx.net >Subject: Re: Graphics in Win32lib > > >----- Original Message ----- >From: <mistertrik at hotmail.com> > > > When it is resized smaller, dark bands appear in the > > middle of the section. > >Hi, > >I have solution for you. You have to use SetStretchBltMode on destination >dc >before painting your bitmap onto it with HALFTONE parameter. > >add this code to Matrin's stretch.exw: > >-- 1. Definitions: > >global constant xSetStretchBltMode = registerw32Function (gdi32, >"SetStretchBltMode", {C_LONG, C_INT}, C_INT) >global constant HALFTONE = 4 > > >-- 2. In function stretchBlt () before calling xStretchBlt () insert this: > >if w32Func (xSetStretchBltMode, { > dstDC, HALFTONE > }) = 0 then > if message_box ("SetStretchBltMode failed", "", 0) then end if > end if > >-- copy area > if not w32Func( xStretchBlt, { >... > >Run it. Now your image is displayed very nice. > >You'll have to be careful with this cause I think it doesn't work on all >versions of Windows operating system. I have actual experience with it. If >I >remember correct it doesn't work on some Winnt version (and win9x?). > >This mode works especially good if you shrink large image into very small >image. > > > ===================================================== .______<-------------------\__ / _____<--------------------__|=== ||_ <-------------------/ \__| Mr Trick