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

Stifu stifu at free.fr
Tue Mar 31 04:09:49 EDT 2009


Hello,

I have an application that displays graphics, stored in a Bitmap.
When you hover the concerned Panel, a square shows what tile you're
currently highlighting. So if you move your cursor, the square moves too.

What I'm doing is, each time I repaint my Panel, clone the Bitmap then draw
the rectangle (square) on it. If I didn't clone it first and worked directly
with the original Bitmap, then the squares would never go away, and keep on
multiplying as you move your cursor over the Panel.
So I'm just wondering: is cloning the right thing to do here? Or is there a
better / more efficient way to achieve the same results, like some kind of
temporary modifications to a Bitmap or whatever? (I'm using double
buffering, so everything has to be on the same Bitmap)

I already implemented clipping to improve performances, but I wanted to know
if there was anything else I could do... Thanks.
-- 
View this message in context: http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p22800298.html
Sent from the Mono - Dev mailing list archive at Nabble.com.



More information about the Mono-devel-list mailing list