Click here to Skip to main content
15,879,474 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,

I've just started using directx for my windows mobile application and i ran into a little problem that i could not solve so far.
I'm trying to draw a polygon with complex coloring (like linear gradient) and i thought that if i create a rectangle 'behind' the polygon with the wanted texture, i could blend them together somehow.
I tried using alpha blending with SourceBlend, DestinationBlend and BlendOperation but i just cannot figure it out how it works, or what is the right combination for these three.
I made an image of what i'd like to achieve, the first two shows the rectangle and the polygon, and the third is what i want. The background is not neccesseraly black, it can be any other color (transparent) or image.

The image

Please give me some help or a hint for another way to do this,
Thanks in advance
Bali from Hungary
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900