Is it possible to draw a curved line with panel paint routine?
-
Hi, I want to draw a curved line inside a panel. I checked the API but I couldn't find a way to do it. there is only api for drawing straight line. Is there a way to do it? Thank you.
-
@mehmethand drawArc
-
thank you David there is no drawArc in the list.I couldn't find it in the documentation, too. How am I going to use it?
-
Sorry I wasn't at my computer. It's
addArc
- https://docs.hise.audio/scripting/scripting-in-hise/scriptpanel.html#a-vectorized-knob -
@d-healey I checked it, it seems very complicated for my skills. Do you have a simple example of addArc function for drawing a simple curved line?
-
@mehmethand said in Is it possible to draw a curved line with panel paint routine?:
@d-healey I checked it, it seems very complicated for my skills. Do you have a simple example of addArc function for drawing a simple curved line?
Trigonometry is not one of my strengths. I just use examples I find on the forum and go from there. Search for
addArc
. -
Check
quadraticTo
, this is as simple as it can get. -
@Christoph-Hart said in Is it possible to draw a curved line with panel paint routine?:
Check
quadraticTo
, this is as simple as it can get.Oo is that recent?
-
@d-healey No, that is sitting there right from the beginning.
-
@mehmethand a simple a example using "quadraticTo"
play with the values and see what happens
HiseSnippet 840.3ocsU01aSCCD1oaAHkWDHwOfn8oLoQIc7pDBwXcanJXiH5.w2PdNtMVKwNXegREh+xH9G.mcRWyfpATIxGZ88xi8cmetyIZEiaLJMwK33Ykbh207GMSBYCxnBIY3dDua3eH0.bcXspcmURMFdJwyasWXU3ErNw888msKMmJY7EpHj2oDL9qDEBXg1jcdoHO+.ZJ+XQQKuu+NCYJ4.UtpBim07iIkT1ozI7inV253S7tz9oBPoGATfaPe1UkNaTlZpr1+2ILhSx4Vg9jQ3FUqlLHSjmlLOWMDh25IKx70py7a6enHUbl9EUfa5LDt.Q6ZfWmKJj5+ODRdsBo0qCoa4OhoEkvBK134p9Ck3ExXJVpaGJ09R57MO+AJzCIzqfdJ+.MJbFhnGFGuUH9ylOoKVsMP3mn5vDpjmG9zv43lvgAphRkDEh1vYcCDPW2pdFNjfEG3MpJPH4QiqjLPnjQS1r6W5FX2vxVaFSywZSBExhv8HnrGKmS0t0S5MFoBOOOOZi3Ou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