first commit
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 1m4s
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 1m4s
This commit is contained in:
commit
6fc0a01c56
51 changed files with 11319 additions and 0 deletions
22
scripts/generate-icons.ps1
Normal file
22
scripts/generate-icons.ps1
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
Add-Type -AssemblyName System.Drawing
|
||||
$iconRoot = Join-Path $PSScriptRoot '../public/icons'
|
||||
New-Item -ItemType Directory -Force -Path $iconRoot | Out-Null
|
||||
foreach ($iconSpec in @(@('icon-192.png',192), @('icon-512.png',512), @('maskable-512.png',512), @('apple-touch-icon.png',180))) {
|
||||
$iconSize = [int]$iconSpec[1]
|
||||
$bitmap = New-Object System.Drawing.Bitmap($iconSize,$iconSize)
|
||||
$graphics = [System.Drawing.Graphics]::FromImage($bitmap)
|
||||
$graphics.SmoothingMode = [System.Drawing.Drawing2D.SmoothingMode]::AntiAlias
|
||||
$graphics.ScaleTransform($iconSize / 192.0, $iconSize / 192.0)
|
||||
$graphics.Clear([System.Drawing.ColorTranslator]::FromHtml('#8391ed'))
|
||||
$cream = New-Object System.Drawing.SolidBrush([System.Drawing.ColorTranslator]::FromHtml('#f5f5ef'))
|
||||
$ringPen = New-Object System.Drawing.Pen($cream,8)
|
||||
$graphics.DrawEllipse($ringPen,48,54,96,96)
|
||||
foreach ($point in @(@(72,112),@(95,122),@(118,112),@(96,99))) { $graphics.FillEllipse($cream,($point[0]-8),($point[1]-8),16,16) }
|
||||
$leaf = New-Object System.Drawing.Drawing2D.GraphicsPath
|
||||
$leaf.AddBezier(96,50,94,27,119,26,120,27)
|
||||
$leaf.AddBezier(120,27,120,44,105,51,96,50)
|
||||
$green = New-Object System.Drawing.SolidBrush([System.Drawing.ColorTranslator]::FromHtml('#cad1ff'))
|
||||
$graphics.FillPath($green,$leaf)
|
||||
$bitmap.Save((Join-Path $iconRoot $iconSpec[0]),[System.Drawing.Imaging.ImageFormat]::Png)
|
||||
$graphics.Dispose(); $bitmap.Dispose(); $cream.Dispose(); $ringPen.Dispose(); $leaf.Dispose(); $green.Dispose()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue