LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Update canvas with a background bitmap?

I have a large bitmap file (a map) I want to use as a background in a canvas control and I need to update the location of several smaller bitmaps on the same canvas without having to redraw everything (especially the large image) every time. I tried several methods, but when I move one of the smaller bitmaps they always leave a "hole" (white background) in the larger bitmap so I end up having to redraw everything. Any help would be greatly appreciated.

Thanks
Haris
0 Kudos
Message 1 of 3
(3,050 Views)
Haris

When you update a canvas with a new bitmap, the canvas does not remember what was previously on it.

I would suggest using a graph instead of a canvas. By using a graph, you can do what you are wanting.

Let me know if you have any difficulties using a graph this way.

Brian
Message 2 of 3
(3,050 Views)
Thanks Brian.
I already tried your approach and it worked. The canvas is faster so I was hoping that I could do it with a canvas instead of a graph. Thanks for your help.

Haris
0 Kudos
Message 3 of 3
(3,050 Views)