forked from StartAutomating/ugit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathugit.PSSVG.ps1
29 lines (24 loc) · 888 Bytes
/
ugit.PSSVG.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#requires -Module PSSVG
$psChevron =
svg.symbol -Id psChevron -Content @(
svg.polygon -Points (@(
"40,20"
"45,20"
"60,50"
"35,80"
"32.5,80"
"55,50"
) -join ' ')
) -ViewBox 100, 100 -PreserveAspectRatio $false
$assetsPath = Join-Path $PSScriptRoot assets
if (-not (Test-Path $assetsPath)) {
$null = New-item -ItemType Directory -Path $assetsPath
}
svg -ViewBox 300, 100 @(
$psChevron
svg.use -Href '#psChevron' -Fill '#4488ff' -X 30% -Y 37.5% -Width 10% -Height 25%
svg.text -X 50% -Y 50% -TextAnchor 'middle' -DominantBaseline 'middle' -Content @(
SVG.tspan -FontSize .5em -Content 'u'
SVG.tspan -FontSize 1em -Content 'git' -Dx -.25em
) -FontFamily 'serif' -Fill '#4488ff' -FontSize 4em
) -OutputPath (Join-Path $assetsPath ugit.svg)