Microsoft Small Basic

Program Listing:
Embed this in your website
' 2012/11/04 17:30:58 Generated by Shapes 1.42
'
Shapes_Init()
s = 1
Shapes_Add()

Sub Shapes_Init
  shX = 169 ' x offset
  shY = 177 ' y offset
  shape = ""
  shape[1]  = "func=rect;x=61;y=55;width=6;height=14;angle=330;bc=#000000;pc=#000000;pw=2;"
  shape[2]  = "func=rect;x=42;y=25;width=5;height=18;angle=338;bc=#000000;pc=#000000;pw=2;"
  shape[3]  = "func=rect;x=8;y=6;width=3;height=19;angle=241;bc=#000000;pc=#000000;pw=2;"
  shape[4]  = "func=rect;x=28;y=23;width=6;height=25;angle=294;bc=#000000;pc=#000000;pw=2;"
  shape[5]  = "func=rect;x=40;y=7;width=5;height=20;angle=358;bc=#000000;pc=#000000;pw=2;"
  shape[6]  = "func=rect;x=33;y=0;width=5;height=18;angle=241;bc=#000000;pc=#000000;pw=2;"
  shape[7]  = "func=ell;x=27;y=39;width=46;height=21;bc=#000000;pc=#000000;pw=2;"
  shape[8]  = "func=ell;x=36;y=76;width=54;height=7;angle=6;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[9]  = "func=ell;x=19;y=86;width=25;height=4;angle=289;bc=#5E635B;pc=#5E635B;pw=2;"
  shape[10] = "func=ell;x=13;y=97;width=19;height=3;angle=347;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[11] = "func=ell;x=169;y=104;width=26;height=6;angle=7;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[12] = "func=ell;x=107;y=75;width=46;height=6;angle=165;bc=#5E635B;pc=#5E635B;pw=2;"
  shape[13] = "func=ell;x=138;y=84;width=43;height=9;angle=238;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[14] = "func=rect;x=16;y=10;width=5;height=20;angle=345;bc=#000000;pc=#000000;pw=2;"
  shape[15] = "func=ell;x=37;y=43;width=11;height=11;bc=#E3D4D1;pc=#000000;pw=2;"
  shape[16] = "func=ell;x=84;y=75;width=39;height=8;angle=152;bc=#5E635B;pc=#5E635B;pw=2;"
  shape[17] = "func=ell;x=105;y=83;width=38;height=9;angle=257;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[18] = "func=ell;x=126;y=103;width=20;height=8;angle=24;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[19] = "func=ell;x=61;y=68;width=46;height=21;angle=12;bc=#000000;pc=#000000;pw=2;"
  shape[20] = "func=ell;x=103;y=73;width=46;height=21;bc=#000000;pc=#000000;pw=2;"
  shape[21] = "func=ell;x=149;y=63;width=73;height=34;angle=352;bc=#000000;pc=#000000;pw=2;"
  shape[22] = "func=ell;x=38;y=74;width=54;height=7;angle=18;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[23] = "func=ell;x=12;y=87;width=48;height=7;angle=282;bc=#5E635B;pc=#5E635B;pw=2;"
  shape[24] = "func=ell;x=0;y=112;width=30;height=5;angle=347;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[25] = "func=ell;x=109;y=76;width=39;height=8;angle=152;bc=#5E635B;pc=#5E635B;pw=2;"
  shape[26] = "func=ell;x=91;y=96;width=56;height=8;angle=268;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[27] = "func=ell;x=119;y=128;width=30;height=5;angle=14;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[28] = "func=ell;x=83;y=75;width=39;height=8;angle=152;bc=#5E635B;pc=#5E635B;pw=2;"
  shape[29] = "func=ell;x=123;y=99;width=79;height=9;angle=238;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[30] = "func=ell;x=181;y=134;width=30;height=5;angle=14;bc=#907D5B;pc=#5E635B;pw=2;"
  shape[31] = "func=ell;x=15;y=52;width=14;height=5;angle=348;bc=#000000;pc=#000000;pw=2;"
EndSub

Sub Shapes_Add
  GraphicsWindow.BackgroundColor="Lightcyan"
  For i = 1 To Array.GetItemCount(shape)
    GraphicsWindow.PenWidth = shape[i]["pw"]*s
    GraphicsWindow.PenColor = shape[i]["pc"]
    GraphicsWindow.BrushColor = shape[i]["bc"]
    If shape[i]["func"] = "rect" Then
      shape[i]["obj"] = Shapes.AddRectangle(shape[i]["width"]*s, shape[i]["height"]*s)
    ElseIf shape[i]["func"] = "ell" Then
      shape[i]["obj"] = Shapes.AddEllipse(shape[i]["width"]*s, shape[i]["height"]*s)
    ElseIf shape[i]["func"] = "tri" Then
      shape[i]["obj"] = Shapes.AddTriangle(shape[i]["x1"]*s, shape[i]["y1"]*s, shape[i]["x2"]*s, shape[i]["y2"]*s, shape[i]["x3"]*s, shape[i]["y3"]*s)
    ElseIf shape[i]["func"] = "line" Then
      shape[i]["obj"] = Shapes.AddLine(shape[i]["x1"]*s, shape[i]["y1"]*s, shape[i]["x2"]*s, shape[i]["y2"]*s)
    EndIf
    Shapes.Move(shape[i]["obj"], shX + shape[i]["x"]*s, shY + shape[i]["y"]*s)
    Shapes.Rotate(shape[i]["obj"], shape[i]["angle"])
  EndFor
EndSub
Copyright (c) Microsoft Corporation. All rights reserved.