08-10-2011 05:28 PM
Hello,
I would like to draw an ellipse over an image that already exists, like using the IMAQ Draw VI, but it only offers ovals. I can imagine possibly using the oval function and giving it coordinates that correspond to its major and minor axis, but how can I implement the tilt angle? Rotating the coordinates just reshapes the oval.
Thanks, Arron
08-11-2011 03:59 PM
Hi Arron,
Unfortunately, this is not easy to do. This code will do it:
You basically have to cause the oval to rotate with the image, rotate the image, then make the oval not rotate with the image, and rotate the image back. Unfortunately, this also messes with the location of it. You can shift the location of the overlay the same way.
This may also be able to be done with rotating the coordinate system that the overlay is associated with, but I'm not quite sure if that can be done.
Have a great day,
Chris V
08-11-2011 07:30 PM
Assuming the image rotation concept works, it seems like it would be simpler to rotate the image, draw the oval, then rotate both back. A lot less math figuring out where to put the oval, etc.
Bruce
08-12-2011 08:51 AM
Bruce,
That's a great point! I definitely agree.
Chris V