Skip to content

Commit e14f116

Browse files
author
James Brundage
committed
PipeScript.PSSVG.ps1
1 parent 5fb04f4 commit e14f116

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

PipeScript.PSSVG.ps1

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#requires -Module PSSVG
2+
3+
$psChevron = Invoke-restMethod https://pssvg.start-automating.com/Examples/PowerShellChevron.svg
4+
$RotateEvery = [Timespan]'00:01:30'
5+
6+
svg -ViewBox 1920,1080 @(
7+
svg.defs @(
8+
SVG.GoogleFont -FontName "Roboto"
9+
SVG.marker -id 'marker' -ViewBox 100,100 @(
10+
svg.polygon -Points (@(
11+
"30,0"
12+
"35,0"
13+
"60,50"
14+
"15,100"
15+
"12.5,100"
16+
"55,50"
17+
) -join ' ') -Fill '#4488ff' -Class 'foreground-fill'
18+
) -MarkerWidth 75 -MarkerHeight 75 -RefX 50 -RefY 50 -Orient 'auto-start-reverse'
19+
)
20+
21+
$psChevron.svg.symbol.OuterXml
22+
23+
24+
svg.text -FontSize 192 -TextAnchor 'middle' -DominantBaseline 'middle' -X 50% -Y 50% -Content @(
25+
SVG.tspan -Content "P" -FontSize 1em
26+
SVG.tspan -Content "|" -FontSize .66em -Dx -.33em
27+
SVG.tspan -Content "peScr" -FontSize 1em -Dx -.25em
28+
SVG.tspan -Content "|" -FontSize .66em -Dx -.33em
29+
SVG.tspan -Content "pt" -FontSize 1em -Dx -.25em
30+
) -Style "font-family: 'Roboto'" -Fill '#4488ff' -Class 'foreground-fill'
31+
32+
33+
34+
35+
$radius = 475
36+
$circleTop = (1920/2), ((1080/2)-$radius)
37+
$circleMid = (1920/2), (1080/2)
38+
$circleRight = ((1920/2) + $radius),((1080/2))
39+
$circleBottom = (1920/2), ((1080/2)+$radius)
40+
$circleLeft = ((1920/2) - $radius),((1080/2))
41+
SVG.ArcPath -Start $circleLeft -End $circleBottom -Sweep -Radius $radius -Large |
42+
SVG.ArcPath -Radius $radius -End $circleLeft -Sweep -Stroke '#4488ff' -Class foreground-stroke -fill transparent -markerEnd "url(#marker)" -strokeWidth 1.25 @(
43+
svg.animateTransform -AttributeName transform -From "360 $circleMid" -To "0 $circleMid" -dur "$($RotateEvery.TotalSeconds)s" -RepeatCount 'indefinite' -AttributeType 'XML' -Type 'rotate'
44+
)
45+
46+
SVG.ArcPath -Start $circleRight -End $circleTop -Sweep -Radius $radius -Large |
47+
SVG.ArcPath -Radius $radius -End $circleRight -Sweep -Stroke '#4488ff' -Class foreground-stroke -fill transparent -markerEnd "url(#marker)" -strokeWidth 1.25 @(
48+
svg.animateTransform -AttributeName transform -From "360 $circleMid" -To "0 $circleMid" -dur "$($RotateEvery.TotalSeconds)s" -RepeatCount 'indefinite' -AttributeType 'XML' -Type 'rotate'
49+
)
50+
) -OutputPath (
51+
Join-Path $PSScriptRoot Assets | Join-Path -ChildPath "PipeScript.svg"
52+
)

0 commit comments

Comments
 (0)