LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Shall I use canvas and canvasScroll to draw a big image ?

I need draw a big image (something about 2000x2000 px). Size of canvas like that force use some scrollbars. What is the best way to support big images ? should I use canvasscroll? values of pixels will be stored in array (if it can be? - so big )

greets and merry christmas
0 Kudos
Message 1 of 2
(2,910 Views)
Hello Obibok,

The canvas control will be able to handle a 2000x2000px image. In order to scroll your image on a canvas, I would suggest using the tips mentioned in this post.

Also, I would suggest using the CanvasStartBatchDraw () and CanvasEndBatchDraw () functions. In general, use CanvasStartBatchDraw whenever you want to make two or more consecutive calls to canvas drawing functions. Before LabWindows/CVI performs drawing operations, it invokes certain operating system functions to prepare for drawing on the particular canvas. Without batch drawing, LabWindows/CVI must call these system functions for each canvas drawing operation. With batch drawing, LabWindows/CVI calls the system functions only once for all of the drawing operations between CanvasStartBatchDraw and the matching CanvasEndBatchDraw, therefore allowing you to increase the drawing performance of the canvas control.

Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 2
(2,895 Views)