LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zoom in on Picture and Line simultaneously?

Solved!
Go to solution

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.

0 Kudos
Message 1 of 6
(3,481 Views)

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>   ---'


0 Kudos
Message 2 of 6
(3,466 Views)

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.

0 Kudos
Message 3 of 6
(3,456 Views)

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.

0 Kudos
Message 4 of 6
(3,452 Views)
Solution
Accepted by topic author ShogunOrta

Ta Daaaaaaa:

BeeHappy.png

(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>   ---'


0 Kudos
Message 5 of 6
(3,432 Views)

Awesome! That did the job!

0 Kudos
Message 6 of 6
(3,423 Views)