2 # SPDX-License-Identifier: GPL-2.0
4 # Script for Image Magick that writes the dss logo in png format
20 declare -a circle arrow rectangle text
24 local inner
='stroke black fill red circle'
25 local outer
='stroke black fill black circle'
29 local step x0 i j idx num
31 for ((i
= 0; i
< 4; i
++)); do
32 step
=$
(((width
/ 4 + num
) / (num
+ 1)))
33 x0
=$
((border
+ width
/ 4 * i
))
34 for ((j
= 1; j
<= $num; j
++)); do
36 circle
[$idx]='-draw'; let idx
++
37 circle
[$idx]="$outer $x,$y,$((x + radius2)),$y"; let idx
++
38 circle
[$idx]='-draw'; let idx
++
39 circle
[$idx]="$inner $x,$y,$((x + radius1)),$y"; let idx
++
43 #echo "${circle[@]}"; exit 0
48 local arrow_head
='l -15,-5 +5,+5 -5,+5 +15,-5 z'
52 arrow
[$idx]='-draw'; let idx
++
53 x0
=$
((3 * border
)); x1
=$
((width
- 2 * border
))
55 arrow
[$idx]="stroke white line $x0,$y $x1,$y"; let idx
++
56 arrow
[$idx]='-draw'; let idx
++
57 x0
=$
((width
- 2 * border
))
58 arrow
[$idx]="stroke white fill white path 'M $x0,$y $arrow_head'"
59 #echo "${arrow[@]}"; exit 0
65 local x x0 x1 y y0 y1 i red_green color
67 rectangle
[$idx]='-draw'; let idx
++
68 x
=$
((width
+ 2 * border
))
69 y
=$
((height
+ 2 * border
))
70 rectangle
[$idx]="stroke yellow fill yellow rectangle 0,0 $x,$y"; let idx
++
71 for ((i
= 0; i
< 4; i
++)); do
72 rectangle
[$idx]='-draw'; let idx
++
73 red_green
="$(printf '%02x' $(((3 - i) * 60)))"
74 color
="#${red_green}${red_green}ff"
75 x0
=$
((border
+ i
* width
/ 4)); x1
=$
((x0
+ width
/ 4 - 1))
76 y0
=$border; y1
=$
((y0
+ height
))
77 rectangle
[$idx]="stroke $color fill $color rectangle $x0,$y0 $x1,$y1"
80 #echo "${rectangle[@]}"; exit 0
85 text
=(-pointsize $pointsize -draw \
86 "fill white text $text_x,$text_y DSS")
87 #echo "${text[@]}"; exit 0
95 convert
-size $
((width
+ 2 * border
))x$
((height
+ 2 * border
)) \
96 -background none xc
: \