Horizontal Centering the LAF Arc Knob
-
I couldn't figure it out to center this arc knob horizontal. Any help much appreciated!
HiseSnippet 1502.3ocsW0saaaCElJMpq1aqacnO.D9J4VGW6zjt.DTz7mcWPZRMpS6VWQQAiDkLWnIEnnShaZA1EauN6UXOK85cydC1NjR1R1wMM0.0APQjmyg767CO7ScTReZRhTgbJc3vXJx4ab6NTn6scOBSf1cGjyMc2mjnoJb5TaMLljjPCPNNW6wlIbJsHx96eezVDNQ3SymBgdgj4SeBqOSmOamM1iw4sIAzCY8Kn8JarquTrsjKG.34ZtMPwD+iIQzCHF0VvE4b8VALsT0USzzDPmsjAC61SdpHU+WvRXGwolAMQcgEJcZz18X7fNi70DDxYwN4d90R87a6tOKfMd97Hv2aEfysnXLvYgKCRM+LfjSAHsXJjtkaWeEKVmKwfmu1cWAjPBIPntHTR0EsvKug61RPCgtdexwz1JXvXK7VoQiZX3Q00KWtLDuSzXNID+P7Ha7UTvUdhzmvehTd7lhf1TJ2CzGzqthFwLkCsGH70LovqRfhb5yjZhZXWNKfppTCGNRXTMr7neqZ4yKeu6g2T4iSUoLlEh8.I00zyz3G9PbkVhSnbYLE+SRdPkp3x3yKigemPTXiR6STQLA.y6u55VAikt2EvdGhtmAuSnVbyKUu3l084Th5B1oHhHJXpAs8ImgWJ8MlXJ8NgvAspTYpoIYlRfcbJQIPLS+zvvDJDBvKWOywrVo7OrGy+XAj0AYMp2bRg+LKP2CDzrdC.PKCOuyD1L0NQEAi2mkJts2My1hycGKdA2Y.8.opOgydKMXcb9JZeL9kn5fQoGZsYzihRGjGWIAAPp26US3T2CubM7LmI02t6DB+nBdcMv+Kh9Zl.oo1dLHyq.fz8lPZ.BB.phn5sjCDAIdq1XB8uBNUTcSQus7ItYswKbM7pSmHFsx1G68EOTTLRrDT1zXMHfLN6Wc8wwiYET1a5XRd3a53g4D4GKhr2kFPvYQjbTLpUPO4IvsLu6c1xOeNnOMnpUiyu.FR+WR8SYvFwi6Q7ZbV61sVscaS2M3TQCb04AYFCd+TU5PmqCA2MKhwyNOaOer9U.XSFtpAIk0dPAvAl1FZJ4UYSEivgdmMW1jlJ.8M4rHAMvfAuVBnIHsdfb.bmxgxtZESD4AXArqJTOTA96tV7kLHLjcVM7qf3A4U2+0Kk2D0LwxP0xJqAOp3C8CUTnk65eNY5hfZjZ4aFT60r9JP78JtooOJAQZbGISTtTTckzbgp23ZWXwgLl8fQ5+eMXaohnswYasUC6uTIg.IimYploAOi5qg13bpW1h..zl+gSHqNZAymKcphhMu1D.dZmh2CmJdu89yrKPsWCIjGU7JlHCv5GKETS10J03t1WLn9BWvB2tltlkGc8IVJNPpoOU3YtAsTYnxbZQggyTlADJImSUyTrg2k5xLzSLn+QTnZ0VlOVQfXxjrct9UisieZLofhRwtBl9owzrwsga8MrXLueQtQnrfpgkTFBAU0VNR2LiiTJyBDCVjux0FkQVvmwuD+m+yGdD546tCQSFsLvJB6RLUoYFmwYG5I.a0TpWkb2glbrVFa0MKOhb9tO4ld1XBs+9K1XXN61WtQhdnIzbcqhn9rf.NsiLgYB8EnQ+2.8p3tvktl4N+1+0i+va+iG0uHSaDBHhTj3c5gcKEYnpueBzVHd29.yYjyO397DJNfFRFv03jig0gyDPq0CkV8O0bSBxw04WgUpGkE0SOZj4vK3wtSPMCnueAZp.AYYv.NQOIqYymGjIv3gEopZniJ.OeXQu3yfJciKkJ8UEh2xsCS62a1XbgYfQnv4KAFy9.ju0sUXHzoJGfK519Wl2u13Sr8PmQMb2w9DnVApbbOXP+tPWTeJr6BAkmXpBVvbzKcbCyXSDnKzR1N3+feYBaZF6jIr4HgPUpuR9F+zCrlOw4F1Y.LIreQWI3SKgw3wmTccgNtlSFr236ab+kZhPy1lkmCat+bXyJygMqNG17f4vlebNrYsK0FyG5t4.sre5wAXhNsrcLcbZIHPkksJD8+rLg70C
-
@Fortune Width of area / 2 - width of knob / 2
-
@d-healey Thanks for the suggestion, but if I use
obj.area
in.addArc
function, the arc disappears. What I use is this:var startOffset = 2.5; var arcThickness = 0.15; var arcWidth = 1.0 - 2.0 * arcThickness; var endOffset = -startOffset + 2.0 * startOffset * obj.valueNormalized; g.setColour(obj.bgColour); p1.addArc([arcThickness / 2, arcThickness / 2, arcWidth + arcThickness, arcWidth + arcThickness], - startOffset , 2.5);
-
@Fortune I'll take a look at your snippet when I'm at my computer
-
Avoid redeclaring variables like this:
HiseSnippet 1453.3ocsWstaaaCEVJIZq1aqaEXO.D9WxsNp1tIcAHnn4l8VPZRMpy51PPPAiDkLWjIEnnSh6Ef8i83rWp8Fr2fsCIk0kDmdwX0FvVjmyg7iemK7nABtOIMkKrrqc7zDhk8W6LbJSNZ2QXJyZ+8rruqyg3TIQfLSsyzDbZJIvx1d4eTMgcsUrze9mmtCNFy7IESYY8RN0m7L5XprX1Aac.MNtONfbLcbIsWaq884rc4w7I.dV1osUB1+bbD4HrRskbrr+hdATIWLThkjTK6U1gGLc3H9kLi9ujlROKlnFzwZHrPlo6yiCTHVMq0tinwAClctSsfUYPAKrrgE9dmCoAz74KXiuSK.UXQY9vdopva4JvqSY30tD7lCjrKAoULP5dNC8EzDYgDEd9Jm8YfyIDCzdYnXz0Zo+5NN6xAMXRuw3yI8EvfbKbWqc6VH3mlaVudcf6SknXbH5InY13KHvQ4Ybeb7y37y2lEzmPhcA8A87DjHpJzn+DlujxYtMBD3KeAWhESGFSCHhFsPgyDF0BwO62aV+M0e3CQaK7QFUpingHWPhmjbkD8jmfZzicAIlmPP+D33ZzDUG8l5H3yEXARozgXQDkAv7QquoVPtzCtA1Gfki.7VQqjN2lZZUR534GSvhYiysSfYQDvTEXGiuBsp4IJynWEcwY5ggk+ZKSJvOxmGFlRfiKpqW1gPakv+3QT+yYfGFj01qSUg+BMPNBDzwqMr6cgeueEat1NQXA46ypk21GjYa44tuFuWfimPNhKFiioulDrYwoJ+gHOPcSZp1ucVjYPA8gCB.Gr6IUNNOD0sEZtyXNUOnhvaUvosfSdYb2RQgFOrFh0qY7wJO.fkHhbG9DVPp65saVPlIfCeav2.JcB9jt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-
It doesn't work properly here.
You'll need to adjust the position of the point.
Honestly, I wouldn't ask if I know how to do it, my head will blow up :D I'd be appreciated if you could show it.
-
It doesn't work properly here.
Oh yeah, I missed that when I was testing.
To be honest if I was doing it I wouldn't include the label as part of the knob, I would draw that separately on the panel behind the knob.
-
@Fortune
i dont know if its centered here but maybe this helps you since it looks like what you are going for?HiseSnippet 1658.3ocsXstaaaCEVNIZn1asXEXO.DFX.1sNt1NIcsHnsN27PPtt3zzMDTjQKQKwEYRCI5j30Vf8.r2f8xLf8u9BrWitmftygRxRxWZZyV0OXLO2324BIOLG5KsXAAReib4OdXelQtuxr8PgxcCWJWXr8lF4ti4dz.EymDRZ8g8oAALaib4l+6QB4xufg96cOacpGUXwRHYXbhjaw1k2iqRndXyc3ddsn1ri48RI8xM21RJ1P5IG.3YdyZF8oVmScX6SQwlyzH2WrkMWI8aqnJVfQtEVWZOrsq7RQn7mvC3c7X3j5FsACERtkzyFQLR0XCWtm8gw9cfAXkCShByGFE9Fy8317QzShFeslAIQizwibykEdymAd0SCuZof2TfTtTPZgPHcWy1V979pDNHd9RysEPxoKEB6ogRnrFy864M2PBRHTU6QOm0xGlLRiROrVsJjkqUq7pEvuG7.xtRKpGY20ZU.REAJhmzx6LOZWxSHw1wxmAtmVvckxyWSX2hw7JosAXARaOtMyOnPrpU8YNbrBp0.gkhKEkJZ6Su7Hoh5OLT3hUHciY5TgH67KkK7Js0NlckhriP1In.g2kTBXUUgzdxSHEOQ5Uj75WSxP74BdfTTrLo.gPdUg7NU6BUaq44o0kqX8BqvpC.Neg7WP8ITv6PlTvyVMjzEPT.LVQsLNUQ.ulG2QvrQDUZOpxspubfvtDHYYx8AQgAzHAC51keUExozSq8xJjZUqux8nmtD7S5oMziK8R3OEsfXoOytH.CMTgg2DkDVy2R6y.YlW.aRGGD3Lby2jdOxYSe9Eroy5ET+dJ2hk0K3qzin2tyDo2CAGDSowRzu90JhOU3vhhj8nWQVL7WbwpQtWjbAPdWcP2tAL.WjFUWNw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lMSYZEg8D7W4Yt2nFl6AZJ.lX54XKACTCqQSuv33.cGXEAyU9JOOk6uJbobw5z5dnS66gNqeOzYi6gNO4dny2cOzYy6TG0H86NVxiLWG.B8NTW3x19PFFxrzYgV+K3jFcC
-
@Straticah that's a nice looking knob
-
Useful & Great Solutions guys, Thank you so much! Both of these are exactly what I need, cheers! :)
-
Thank you, it's just what i looked for! Can i reuse this idea please?
-
@ForeverLive my idea, of course!