[Mono-dev] Bitmap manipulation - am I doing it right?

Stifu stifu at free.fr
Wed Apr 1 06:20:45 EDT 2009


I just read a bit on this, and it sounds just like what I need. :)
Thanks!


StApostol wrote:
> 
> Την Wed, 01 Apr 2009 09:08:02 +0300,ο(η) Stifu <stifu at free.fr> έγραψε:
> 
>>
>> How would that layer on top work, technically?
>> Because if it's not part of the same Bitmap (the only painted on the  
>> Panel)
>> and I that I need to paint twice, then there's some flickering happening.
>> Hence the need for double buffering.
>>
> 
> I cannot speak for GDI+, because I don't know its architecture. However it  
> does support alpha channels, which means it should be able to do alpha  
> blending. An easy test is to render a filled rectangle with A = 128, using  
> the Graphics object of the panel. (Hook the Paint event and make sure the  
> Bitmap is rendered before the Rectangle.)
> 
> If you are using double-buffering, the composition will always happen in  
> the backbuffer - hence no flickering.
> 
> Some general reading on alpha blending:
> http://en.wikipedia.org/wiki/Alpha_compositing
> 
> Code project article on alpha blending Bitmaps (which is not what you  
> actually want, but may be useful if the above technique does not work):
> http://www.codeproject.com/KB/GDI-plus/AlphaBlending.aspx
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p22823572.html
Sent from the Mono - Dev mailing list archive at Nabble.com.



More information about the Mono-devel-list mailing list