fork download
  1. Imports System.Drawing
  2. Imports System.Drawing.Imaging
  3. Imports System.IO
  4.  
  5. Namespace ConsoleApplication1
  6. Class Program
  7. Private Shared Sub Main(args As String())
  8. Dim bmp As New Bitmap(400, 350)
  9. Dim bbg As Brush = New SolidBrush(Color.Black)
  10. Dim bfg As Brush = New SolidBrush(Color.Green)
  11. Dim drawer As New Pen(bfg)
  12. Dim g As Graphics = Graphics.FromImage(bmp)
  13. Dim num As Integer = 64
  14. Dim i As Integer = num
  15. g.FillRectangle(bbg, New Rectangle(0, 0, bmp.Width + 1, bmp.Height + 1))
  16. Dim j As Integer = num + 30, k As Integer = 0, l As Integer = 90 - num
  17. While i > 0
  18. bfg = New SolidBrush(Color.FromArgb(j, k, l))
  19. drawer = New Pen(bfg)
  20. g.DrawLine(drawer, New Point(i * bmp.Size.Width \ num, 0), New Point(bmp.Size.Width, i * bmp.Size.Height \ num))
  21. g.DrawLine(drawer, New Point((num - i) * bmp.Size.Width \ num, bmp.Size.Height), New Point(bmp.Size.Width, i * bmp.Size.Height \ num))
  22. g.DrawLine(drawer, New Point(0, (num - i) * bmp.Size.Height \ num), New Point(i * bmp.Size.Width \ num, 0))
  23. g.DrawLine(drawer, New Point(0, (i) * bmp.Size.Height \ num), New Point(i * bmp.Size.Width \ num, bmp.Size.Height))
  24. i -= 1
  25. j -= 1
  26. k += 1
  27. l += 1
  28. End While
  29. bmp.Save(Console.OpenStandardOutput(), ImageFormat.Png)
  30. End Sub
  31. End Class
  32. End Namespace
Success #stdin #stdout 0.33s 24120KB
stdin
http://i...content-available-to-author-only...e.com/WMYoR in VB
stdout