10-05-2021 07:47 AM
Hi, I found this example that I would like to use as a starting point to do a simple image rotation as an indicator.
I would like to learn how to do this. Are there any NI courses or youtube videos that teach this? I may be searching for the wrong topic as I could not find what I was looking for
Thank you.
10-05-2021 03:48 PM
There are two main things you could try, a 2d picture control lets you draw a picture (basically a big array of pixel, there are good examples on how to use it). Once you had your arbitrary picture you can use math to rotate the the array of pixels.
The other option I would consider is to use use a picture ring. Its essentially an enum that has a picture for each value. This is handy if the thing you want to rotate has a set number of fixed positions like a key switch.
Then you just pick which angle you want it to be at and set the enum accordingly. I usually use a program like gimp/photoshop to create the images I need. These are also reasonably fast because you dont have to do any math on the fly to redraw your picture.