Assistance needed with a vector knob
-
Hello,
I'm trying to create a vector knob in a panel. It consists of two arcs, one overlaid on the other, and that part works just fine.
What I'd like to add to it is a little circle to indicate the current position. A bit like this:
This needs to be added without rotating the canvas, because there will be multiple things drawn on the same panel.
Anyone know how to do it?
HiseSnippet 1362.3oc0W0raaaDDdoiYRrZUQCPe.VjSTNJJTJNoEvHH9+Bgz3HTk5TffffUjqDWXpcYWtzJJA4XeO58Vzmodom5k9FzNyRRQJGam.i5CUvv1ye67M+s6nAZU.OMUoINq874Ibhym6NbtzDsaDSHI82i3zv8XoZjgmZH6LOgklxCINNW6aQ4NqsJw94ue7NrXlLfWwhPNRIB3emXpvTwcvVOQDGe.Kj+bwzZZuwV8CTxcUwpL.KWy0mjvBNlMgeHCUaEWhy02OTXT5gFF.Fhyp6nBmOLRMSlq+QhTwnXNRzkLDNnb1GnhCQDibI6FIhCGTFyoD3TFTkAtVdF3qbepHTrfeUl3KsBnUVTOe3rxEAut0gm+mN7bpAuUyg2sbGFnEIlJIH19L29RCWOlAkf5vJWWxJ+9Mb2UAZHMclxNlefFHVXg2C88aSefueqMa1nYCnPjZnmvzzm.U9tzGQKMcB2rqZZhRBDd21J8141HjwBImNNSFXDJIUIsRQC0pXufRqZCmabFuUyFuqYi0Fvj73tcz7DHGa7vi581i6BcXmTjq8f2kEGOBZT7V1emNNx8y4FH4hKhjBLA9X.BpuWkYfHyqLx7lzBPNE9j+a73SMLs4YiGC1.9nWmGr4BQLcvyiDAGKgREHaiN8VR1KDglHfe2RaxOz6cuWDILbTilKwltcXH0DYkPmI.aQhIhS3RfEmQYxPpvjRUVzjRERplEJXRpmOsSmNzdqOneqJnmTOqD.mfgOfYhfRgUkjtcXggaqC7dIzg.+zE94Uso2EBx1XjVn2j7ZBN85k+mzNyvP.yozhOkwfIRjRk7YzobSjJjp4lLsL0FJoArXdHcjJSFlVEgAJslGXfXApAUfGP51XT+HDnPMcGqYda3W51RMdo+qPkpQcGZW+SqT2kTpagRe.9C0rYoKpBdYo7BB.Ii0poT1H0I.OEkchRDRmwEZLJwXSHmzpHigGiMWm.I0Ru1ldeLoV5RrgL2q6.SMU8C1nu24U5pzQpzSAm9Vd3Q3XGXfcLAyUVFGtPdYEudfB3MHKFNWa7wgVqhdIaTZqKYPcQZxGpW3UPyESC2s9vwcfVFe55KMvr9oA4GhC7FKZZlNGGukqU4NrnRvnvD5b.Trh6dFWVbrGPcz7THAAW.9FuELaeZD52oKjJ9ucdKuMq24LKUy+sqP6ELYMBuAcyql4p5yT89e7LUu5yT0uEtLLZ79VaV64pCUF9yjdsZ7tFq038MnmVz3wmorhGbh45yTLtji9hLzSlMcDWW9rXohvq8KuNg64uNQ8scBxuNnlhJYeov7rDt77VxfTbGBrtwJEnBT0XW13KJV1XXrHjqIBXmha3ZuBgXAb8M.Im13lkapfunZs8lt4uttrw+7e8mOl7C82iYX3JOEvAfXBWaDXz6rG+DXWx7EfVycOd5wFUhEuEOhCYnOJheyBz9KAaMuhfu0TQXXLefJUfUmpf5OvfZgGt4GMr.O35fFNu7eh3hIQH5b9MfZF9bOR7q.QJ6Dde4.nGliKHecmh0lUIreBSNNqP9vs+fcPUg3cxKuXJtMdg.L.puAHtkmDBr40qUWIaq9oB2a4NPXBhNa7txYfWry7JFuE692zc+wigKDq.6ptG7iW8K5SxWybB79jVfcQGlMcHbWe.GPhD5svq.fFBzTKseYC1P3ACKw+.eJD1EocJD1sTHYJKPqdcP9TJ9sKtokCfIo8KYsl6SQZ5hwSWW+N9DX3P75f.LUbW.6msM8tD1b+KgMabIr4AWBad3kvlu9RXy2bg1feeysyLpo4iI.iA6aulzwYeIC5xrcjj+EPHDp1w
-
@d-healey I imagine the panel size is good, right?
-
@d-healey Trigonometry is your friend :)
HiseSnippet 1523.3oc0Xs0aaTDEd2zrkZCAQk3Yzn9z5TGmccSJUMpTmqHqRSsvkVjhpJS1cr8nrdFyrisiaUj3k9+feJ7SAIDOwK7O.NmYuZ2jzpHxCrxxwy4xb9N2l8LoiRFvhikJK6JO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Bm4F4Go1VHXJR.WEDwJ5bXQQ7QwXGyaO8gPxZF9k5g9dmMm9oh03TPv64ANmoBKPF6tXq2pjMIqMWk+ZIB2o85MqAr8atkAOv17nugD.sUPAeZsLNBVZWmbzZQrd54M+r4LeLWb0MueSz7XQ733LymELLHHAYkCB8azCFpa+DgbOJOlrV1uTqCoibrd9jUk94qxRRUOq1Vklo3Pol8LgaspusZkpmUkrHqd8NWdoSEDwTmKabRT0konqX7viYprYWxDDFIa9Y9bt3Y9JORZPxY1kDTJZK35mMhItnIAsROnGlIboTTAhpMSD94oSD1MhGxTVbXvuOwwbNukAvoSY+ae069iGasnxqjMNIN1iQ2a4jLBzbJa8t+5Oer0OzdOplhyklBG.hiXJMG8d68XSfA9SlRshydr3SfhUCdSmzBhPePDeZ9cB90fVyJVvZMjGFFw5Hi4X1o3pC+N5T4V3VeP2pvBdSJYAqGzZ.i2ePwkU9EVqo37Y4D9IVqX5DVaQG3fGFJ3MsSuqibD8mwfk8RVu+H6vEGjg3KRm+1D3UnRYfNT4w1wQyEfiNq7UrtVthwGKbusSGtNXv4i2kNG7hUpWy3M8Baq3reudvawJ.6xNG7iW+2NyJ4tA8giQUbnpx4vwC6BufNfAHAdoRDdj.TPfpZV6gqwHSW3s7lE+C7jxzGWamxzOio0PZfR95fjtV7Jg2xPAvjvby3JNOEWSxaWcb7Z3YAMK7WGDfgh0.re95z7Jny8tB5rwUPmMuB5b+qfNe8UPmGbo5f+SB1drVNLoMAHzYeywl116KnPUlohz5eEPDqKB
But rotating the canva is still your friend too, if you draw the ellipse at the end of the paintRoutine, nothing else will be affected…
-
@ustk Thanks, I'll try your snippet!
if you draw the ellipse at the end of the paintRoutine, nothing else will be affected…
There will be more than one knob on the canvas so this won't work unfortunately.
-
@ustk That works perfectly, thank you! Now I shall go and study trigonometry, it's about time!
-