summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4')
-rw-r--r--graphics/circuit_macros/examples/svg/AntiqueClockSVG.m416
1 files changed, 7 insertions, 9 deletions
diff --git a/graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4 b/graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4
index 0848a53cbe..63c169d3e2 100644
--- a/graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4
+++ b/graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4
@@ -4,9 +4,7 @@ gen_init(svg_font(font-family="sans-serif" font-stretch="condensed"))
# https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals
-# `Initialize rotated text. Any unrotated text must
-# appear after the rotated text.'
-svgrot_init(AntiqueClockSVG)
+svg_rot_init(AntiqueClockSVG)
# `hms2deg(hr,min,sec) hr:min:sec to degrees
# blank arg1: degrees for minute hand
@@ -74,8 +72,8 @@ define(`AntiqueClock',`[ # h,m,s,diam
second = ifelse(`$3',,51,`$3')
# outer radius
ifelse(`$4',,`skale=0.5; r1=2',`r1=(`$4')/2; skale=r1/4')
- r2 = r1-0.5*skale
- r3 = r2-0.14*skale
+ r2 = r1 - 0.5*skale
+ r3 = r2 - 0.14*skale
r4 = r3 - 0.35*skale
r5 = r4 - 0.17*skale
r6 = r5 - 0.63*skale
@@ -117,11 +115,11 @@ Face: circle thick 0 fill_(1) rad r3 at C
textht = (r3-r4)*0.6
for mn = -15 to 15 by 5 do { t = 90-mn/60*360
R:(Rect_((r3+r4)/2,t))
- svg_rot(mn/60*360,sprintf("%g",pmod(mn,60)) at C+R+adj(t))
+ svg_rot(-mn/60*360,sprintf("%g",pmod(mn,60)) at C+R+adj(t))
}
for mn = 20 to 40 by 5 do { t = 450-mn/60*360
R: (Rect_((r3+r4)/2,t))
- svg_rot(-180+mn/60*360, sprintf("%g",pmod(mn,60)) at C+R+adj(t))
+ svg_rot(180-mn/60*360, sprintf("%g",pmod(mn,60)) at C+R+adj(t))
}
# Outer tics
for mn = 1 to 60 do { t = 90-mn/60*360
@@ -131,11 +129,11 @@ Face: circle thick 0 fill_(1) rad r3 at C
textht = (r5-r6)*0.6
Loopover_(`mx',`tt = 90-(m4Lx-4)/12*360
R: (Rect_((r5+r6)/2,tt))
- svg_rot(90-tt, "mx" at C+R+adj(tt)) ',
+ svg_rot(tt-90, "mx" at C+R+adj(tt)) ',
IX,X,XI,XII,I,II,III)
Loopover_(`mx',`tt = 360-m4Lx*30
R: (Rect_((r5+r6)/2,tt))
- svg_rot(270-tt, "mx" at C+R+adj(tt)) ',
+ svg_rot(tt-270, "mx" at C+R+adj(tt)) ',
IV,V,VI,VII,VIII)
# Inner tics