登录:     


Forum: VirtualDJ Skins

Topic: radius can't compute and or use computed placeholders

由于该帖子已年深日久,可能包含陈旧过时或描述错误的信息。

creating a custom jog
<visual type="circle" source="get position" x="+2" y="+2" width="200-4" height="200-4">
<on shape="circle" color="deckcolor" radius="84" border_size="2" border="bordercolor"/>
</visual>
works perfectly

<on shape="circle" color="deckcolor" radius="42*2" border_size="2" border="bordercolor"/>
would work but radius is set to 42

now the same when used with placeholders="*size=200" in a way to create different size using only one definition
<visual type="circle" source="get position" x="+2" y="+2" width="[SIZE]-4" height="[SIZE]-4">

<on shape="circle" color="deckcolor" radius="[SIZE]*42%" border_size="2" border="bordercolor"/>
<on shape="circle" color="deckcolor" radius="[SIZE]*0.42" border_size="2" border="bordercolor"/>
won't work because math with are integer only

<on shape="circle" color="deckcolor" radius="[SIZE]*42/100" border_size="2" border="bordercolor"/>
would work but this kills the elements and nothing display - not radius set to 0 or 42

<on shape="circle" color="deckcolor" radius="42*[SIZE]/100" border_size="2" border="bordercolor"/>
would work but radius is set to 42

adding a placeholder
<define class="jogwheel" placeholders="*size=200,*radius=84">

<on shape="circle" color="deckcolor" radius="[RADIUS]" border_size="2" border="bordercolor"/>
will work as long as radius is a constant
 

发表时间 Mon 28 Oct 19 @ 3:52 am
No news?
Already no way to compute radius either from placeholders or hardcoded
when multiple placeholders can be used ^^
radius="[R1][R2]"
as well as other strange things
radius="[R1]0" equivalent to pseudo (R1*10)
radius="1[R2]" equivalent to 10+R2
 

Will be fixed in next update. +-/* was only available for integer fields, and radius was read as floating point field, but I guess that was not really necessary.
 

useful to draw discs where radius is center hole and rectangles with proportional round angles
also needed to be able to draw "eyes" shapes where radius depends both width or height
Thanks
 



(陈旧帖子或论坛版块会自动关闭)