Rotary switch rotate image
Rotary switch rotate image
Quick question: Is it possible for a rotary switch to use the same image for all positions with different rotation angles?
Re: Rotary switch rotate image
No, you'll have to create multiple images.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Rotary switch rotate image
Hi,
Not possible in the switch_add.
BUT
Yes it can be done. In the switch_add you use a nil for all the switch images.
Then you place your image where the switch is located.
I your logic you can rotate the image.
This is often used to animate slow action switches and buttons.
You can do the same if your switch is a canvas_draw()
Keith
Not possible in the switch_add.
BUT
Yes it can be done. In the switch_add you use a nil for all the switch images.
Then you place your image where the switch is located.
I your logic you can rotate the image.
This is often used to animate slow action switches and buttons.
You can do the same if your switch is a canvas_draw()
Keith
Last edited by Keith Baxter on Sat Apr 03, 2021 1:21 pm, edited 1 time in total.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: Rotary switch rotate image
Yes and No i guess is the correct answer. It really depends on the context.
Yes - Do as Keith describes and manage the image rotation yourself with some additional code.
No - Like Ralph posted, you need separate images if you are just using the switch_add() functionality.
Yes - Do as Keith describes and manage the image rotation yourself with some additional code.
No - Like Ralph posted, you need separate images if you are just using the switch_add() functionality.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D