LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

cutting picture control

Hi

I have large picture control on screen.

I  want to copy apart from the picture   to another picture control ,of course I am talking about doing it with CVI .

 

 Anyone has any idea ??

 

0 Kudos
Message 1 of 2
(2,817 Views)
Hello,
 
First, get a bitmap of the picture using the GetCtrlBitmap function. Then, create a temporary, invisible canvas. Draw the picture to the canvas, using the CanvasDrawBitmap function. Adjust the sourceRect parameter of this function to draw only the part of the bitmap that you need. Make sure that the canvas size is equal to the size of the part of the bitmap you want to copy. Now, use GetCtrlBitmap on the canvas control and you will have the part of the bitmap that you wanted.
 
Good Luck,
Wim
0 Kudos
Message 2 of 2
(2,811 Views)