03-15-2013 03:20 PM
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.
03-16-2013 02:20 PM
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.
03-16-2013 02:24 PM
Also, please keep the discussion to a single thread - http://forums.ni.com/t5/LabVIEW/Picture-to-String-Conversion/m-p/2352436#M734432
03-18-2013 09:03 PM
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.
03-18-2013 09:19 PM
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.