Drawing layer for rectangular zoom without redraw all layers (C#)
Hello,
I have a problem concerning draw of layers.
I allow to user of my software to zoom on a rectangular area which he draws itself (with event Mouse down, mouse move and mouse up). But with the SDK, i must to redraw all layers when the user moves the mouse to do appear the area. I have lots of calculs and informations to display all my layers and the performances are very bad.
Have you a solution to redraw only one layer? I have tried to make several bitmap with transparence, but i can't display all these bitmap in one Winform (C#). I have tried lots of solutions but finally, SDK uses one bitmap for display all layers and i don't know if there is really a solution. (How do you implement that in your software Global Mapper?)
Thanks in advance.
I have a problem concerning draw of layers.
I allow to user of my software to zoom on a rectangular area which he draws itself (with event Mouse down, mouse move and mouse up). But with the SDK, i must to redraw all layers when the user moves the mouse to do appear the area. I have lots of calculs and informations to display all my layers and the performances are very bad.
Have you a solution to redraw only one layer? I have tried to make several bitmap with transparence, but i can't display all these bitmap in one Winform (C#). I have tried lots of solutions but finally, SDK uses one bitmap for display all layers and i don't know if there is really a solution. (How do you implement that in your software Global Mapper?)
Thanks in advance.
Comments
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/
I understand the principle (i believe). A little script to be sure :
#Scenario#
bitmap with static layer -> i put in the buffer of the bitmap the static layers -> |.....| <- (its the state of the buffer);
---- the user moves the mouse ---
add temporary layer -> i put at the end of the buffer of the bitmap this layer -> |.....|..| <- (its the state of the buffer);
---- the user releases the mouse ---
remove temporary layer of the buffer of the bitmap-> |.....| <- (its the state of the buffer);
#End#
But if the bitmap is modified, i must to redraw and refresh the background of the window with the bitmap no?
And how can i remove just the part of the buffer what i need without destroy my bitmap? Maybe i must to recreate a bitmap each time?
Sorry for all this questions but i'm a litlle confused to use buffer of bitmap.
Thanks again.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/
But i wanted to find a solution to not reset bitmap with all static layers on my panel to not have a blinking effect, when the user draws an area with mouse on temporary layer at top.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/