Re: Scaling images

new topic     » goto parent     » topic index » view thread      » older message » newer message

Brian Broker wrote:
> 
> 
> It's a bit more complicated than that if you want an antialiasing effect.
> You can do something like this:
> }}}
<eucode>
>   -- for antialiasing effect
>   hdc = getDC( Win )
>   w32Proc(xSetStretchBltMode,{hdc,HALFTONE}) -- HALFTONE = 4
>   w32Proc(xSetBrushOrgEx,{hdc,0,0,NULL})
>   releaseDC( hdc )
> </eucode>
{{{

> 
> Now your stretchBlt should look better (with antialiasing effect).
> 
> Unfortunately, the HALFTONE option is not supported on Windows 95/98/Me.
> 
> Declarations for the above functions are:
> }}}
<eucode>
> constant
>   xSetStretchBltMode =
>   registerw32Procedure(gdi32,"SetStretchBltMode",{C_POINTER,C_INT}),
>   xSetBrushOrgEx =
>   registerw32Procedure(gdi32,"SetBrushOrgEx",{C_POINTER,C_INT,C_INT,C_POINTER}),
>   HALFTONE = 4
> </eucode>
{{{

> 

Brian,

Perfect!  Exactly what I needed.  Thanks a bunch!

Jonas Temple
http://www.yhti.net/~jktemple

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu