07-13-2015 03:32 PM
So I have accomplished the ability to zoom in/out of a picture on the Front Panel with user input. And I have separately found out how to programmatically create a Line from the Block Diagram with Draw Multiple Lines.vi, and it appears on the Front Panel at run. But now I would like to combine the two so that I have a zoomable picture on the Front Panel which likewise has a coded Line which is simultaneously zoomed in on at the same time as the picture. You know, so that the zoom is the same for the picture and the line, and the line is still proportionally in the same place on the picture that it was before the zoom.
Right now I have tried to overlay the Line with the picture, but it's no dice. The Line appears and is zoomable in Front Panel, but the picture disappears. I would like to have both visible with Line ontop of picture and both zoomable by the one zoom control switch.
I have screen shots of the Block Diagram and Front Panel below.
Solved! Go to Solution.
07-13-2015 03:46 PM - edited 07-13-2015 03:48 PM
Please don't just attach pictures of your code. It's much easier for us to try out your code if you include a Snippet instead.
That being said, you are zooming in on the line. The line you drew is an overlay. It has no thickness, so there will be no more pixels shown when zoomed in other than that length change that you are observing. If you want a line with some sort of thickness, you would need to overlay some sort of shape that resembles a line.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-13-2015 03:53 PM
You're right. I should have just attached the VI. Here it is. But I think I'm not stating my problem correctly. I know I can zoom in on the Line properly. But there is a picture of a Bee that should be visible behind the line. But it's not. It's just a white box. So I wanted to understand why the picture of the bee is disappearing. Thanks though.
07-13-2015 03:58 PM
And here is the altered VI so that the Bee picture is visible/zoomable, but the Line is gone. In the Block Diagram I just took away the New Picture Reference from being connected to the Draw Multiple Lines.vi function which got rid of the Line. Just so you can see what I mean.
07-13-2015 04:04 PM
Ta Daaaaaaa:
(You have to add the image before the line, so the line is on top...)
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-13-2015 04:14 PM
Awesome! That did the job!