Microsoft Small Basic

Program Listing: MDQ753-0
' Outline Test 0.0
' Copyright (c) 2014 Nonki Takahshi. The MIT License.
' Program ID MDQ753-0
' Last update 2014-11-02
'
gw = 598
gh = 428
GraphicsWindow.Width = gw
GraphicsWindow.Height = gh
GraphicsWindow.Title = "Outline Test"
DrawGrid()
thickColor = "#400000FF"
thick = 20
thinColor = "#800000FF"
thin = 6
' draw
GraphicsWindow.BrushColor = "Black"
GraphicsWindow.DrawText(100, 170, "GraphicsWindow.DrawXXX()")
GraphicsWindow.PenColor = thickColor
Program.Delay(300)
GraphicsWindow.PenWidth = thick
GraphicsWindow.DrawRectangle(100, 50, 100, 100)
GraphicsWindow.PenColor = thinColor
Program.Delay(300)
GraphicsWindow.PenWidth = thin
GraphicsWindow.DrawRectangle(100, 50, 100, 100)
GraphicsWindow.PenColor = thickColor
Program.Delay(300)
GraphicsWindow.PenWidth = thick
GraphicsWindow.DrawEllipse(250, 50, 100, 100)
GraphicsWindow.PenColor = thinColor
Program.Delay(300)
GraphicsWindow.PenWidth = thin
GraphicsWindow.DrawEllipse(250, 50, 100, 100)
GraphicsWindow.PenColor = thickColor
Program.Delay(300)
GraphicsWindow.PenWidth = thick
GraphicsWindow.DrawTriangle(400, 150, 450, 50, 500, 150)
GraphicsWindow.PenColor = thinColor
Program.Delay(300)
GraphicsWindow.PenWidth = thin
GraphicsWindow.DrawTriangle(400, 150, 450, 50, 500, 150)
' shapes
GraphicsWindow.BrushColor = "Black"
GraphicsWindow.DrawText(100, 370, "Shapes.AddXXX()")
GraphicsWindow.BrushColor = "Transparent"
GraphicsWindow.PenColor = thickColor
Program.Delay(300)
GraphicsWindow.PenWidth = thick
shp = Shapes.AddRectangle(100, 100)
Shapes.Move(shp, 100, 250)
GraphicsWindow.PenColor = thinColor
Program.Delay(300)
GraphicsWindow.PenWidth = thin
shp = Shapes.AddRectangle(100, 100)
Shapes.Move(shp, 100, 250)
GraphicsWindow.PenColor = thickColor
Program.Delay(300)
GraphicsWindow.PenWidth = thick
shp = Shapes.AddEllipse(100, 100)
Shapes.Move(shp, 250, 250)
GraphicsWindow.PenColor = thinColor
Program.Delay(300)
GraphicsWindow.PenWidth = thin
shp = Shapes.AddEllipse(100, 100)
Shapes.Move(shp, 250, 250)
GraphicsWindow.PenColor = thickColor
Program.Delay(300)
GraphicsWindow.PenWidth = thick
shp = Shapes.AddTriangle(0, 100, 50, 0, 100, 100)
Shapes.Move(shp, 400, 250)
GraphicsWindow.PenColor = thinColor
Program.Delay(300)
GraphicsWindow.PenWidth = thin
shp = Shapes.AddTriangle(0, 100, 50, 0, 100, 100)
Shapes.Move(shp, 400, 250)
Sub DrawGrid
GraphicsWindow.PenWidth = 1
GraphicsWindow.PenColor = "Gray"
For x = 0 To gw Step 50
GraphicsWindow.DrawLine(x, 0, x, gh)
EndFor
For y = 0 To gh Step 50
GraphicsWindow.DrawLine(0, y, gw, y)
EndFor
EndSub