Skip to content

Instantly share code, notes, and snippets.

@c-yan
Created June 16, 2018 09:12

Revisions

  1. c-yan created this gist Jun 16, 2018.
    21 changes: 21 additions & 0 deletions create-circle-cut.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    [IO.Directory]::SetCurrentDirectory((Get-Location).Path)
    Add-Type -AssemblyName System.Drawing
    $b = new-object System.Drawing.Bitmap 650, 1000
    $g = [System.Drawing.Graphics]::FromImage($b)
    $g.Clear([System.Drawing.Color]::White)
    $f = new-object System.Drawing.Font "Noto Sans CJK JP Regular", 45
    $g.TextRenderingHint = [System.Drawing.Text.TextRenderingHint]::AntiAlias
    $g.DrawString("みゃねっと", $f, [System.Drawing.Brushes]::Black, (new-object System.Drawing.PointF 50, (400 - 20)))
    $f.Dispose()
    $f = new-object System.Drawing.Font "Noto Sans CJK JP Regular", 34
    $g.DrawString("チップチューンあります", $f, [System.Drawing.Brushes]::Black, (new-object System.Drawing.PointF 50, (550)))
    $g.DrawString("http://m.cyanet.jp/", $f, [System.Drawing.Brushes]::Black, (new-object System.Drawing.PointF 50, (825 + 20)))
    $f.Dispose()
    $g.FillRectangle([System.Drawing.Brushes]::Black, (new-object System.Drawing.Rectangle (700 - 350 + 50 - 20 - 24) , (100 - 20 + 20 - 10 ), 244, (176 + 7)))
    $g.FillRectangle([System.Drawing.Brushes]::Gray, (new-object System.Drawing.Rectangle (700 - 350 + 50 - 20 - 24), (100 - 20 + 20 + 89 - 10), 244, 5))
    $f = new-object System.Drawing.Font "Noto Sans CJK JP Regular", 40
    $g.DrawString("Lo-Res", $f, [System.Drawing.Brushes]::White, (new-object System.Drawing.PointF (700 - 350 + 50 - 24 + 3), (100 + 20 - 4 - 5 + 3 - 10)))
    $g.DrawString("AUDIO", $f, [System.Drawing.Brushes]::White, (new-object System.Drawing.PointF (703 - 350 + 50 - 24 + 3), (160 + 20 + 7 + 4 + 5 + 11 - 10)))
    $f.Dispose()
    $b.Save("circlecut.png", [System.Drawing.Imaging.ImageFormat]::Png)
    $b.Dispose()