LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Shift Multiline Text in a Picture ??

Hi All,

 

I have written a MultiLine Text in a Picture using "Draw Text at Point" Function. How can I shift (right and left) my first line of the text in the picture without shifting other text lines in the picture ???

 

Please help it is very IMPORTANT.

 

I am using LabVIEW 2011.

 

Thank you so much.

0 Kudos
Message 1 of 5
(2,839 Views)

You can use the Picture to Pixmap VI followed by the Unflatten Pixmap VI to convert the picture to a 2D array. You can now use the array primitives (Array Subset, Replace Array Subset) to move the pixels to where you want them and then convert back to the picture.

 

The other alternative, if the picture is newly created, is to just recreate it with the new values.


___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(2,809 Views)

Also, please keep the discussion to a single thread - http://forums.ni.com/t5/LabVIEW/Picture-to-String-Conversion/m-p/2352436#M734432


___________________
Try to take over the world!
0 Kudos
Message 3 of 5
(2,808 Views)

Thank you very much tst !

 

Tooday I have tried the second alternative that you have suggested by creating a new picture every single time with the new positions and it worked quite well.

 

 

0 Kudos
Message 4 of 5
(2,777 Views)

For this particular problem, solution was to use nested for loops. Specifically I have used two for loops. First for loop was responsible to target specific row of the multiline text that I was planning to shift right or left. The second loop was responsible to place the rest of the row of text on their original positions. All of that was tied through a shift register that updated the positions every time a shift happens.

0 Kudos
Message 5 of 5
(2,772 Views)