Main > Software Forum
Reflection + Gradual Alphablending on a Layout
<< < (5/8) > >>
headkaze:
You could use AlphaBlend API function.
audiomidiman:
Nice......
Howard_Casto:

--- Quote from: headkaze on February 18, 2007, 05:11:31 am ---You could use AlphaBlend API function.

--- End quote ---

Yeah I mean even if you don't have the gui setup to rotate objects sending stretchblt with a top lower than the bottom automatically mirrors any image.
youki:

--- Quote ---MaLa is a pure GDI application and not a DirectX application. I don't think that it is possible to do this with GDI stuff.
--- End quote ---

It is easiest with GDI, as said HeadKaze use AlphaBlend function.  Not sure about performance, but it supports hardware acceleration , so if you have a modern video card it should be good. 
The function does not support mirroring, so i guess you will have to mirror before alphablend.

The other solution is to manipulate directly image bits.  (it is what i do with DirectDraw , because DirectDraw doesn't support Alpha Blend without a specific hardware doing that... and i never saw a "commun" video card supporting that feature (via DirectDraw) )  but if you use only GDI i think the Alphablend function would be the best solution.



headkaze:
Yep, your both right, I just knocked up a demo using GDI+ to create a reflection...

You use StretchBlt to flip it vertically to a MemDC (using CreateCompatibleDC/CreateCompatibleBitmap), then use AlphaBlend to draw each part gradually fading to the bottom.
Navigation
Message Index
Next page
Previous page

Go to full version