function LoadDrawing(offset_x, offset_y, scale_x, scale_y, filenumber, filename$)
   open to read filenumber, filename$
 
   do
      if file end(filenumber) = 1 then exit
 
      read string filenumber, line$
 
      if left$(line$, 4) = "ink "
         line$ = right$(line$, len(line$) - 4)
 
         parameter = 0
 
         foreground_color$ = ""
         background_color$ = ""
 
         for n = 1 to len(line$)
            a$ = mid$(line$, n)
            if a$ = ","
               parameter = parameter + 1
            else
               if a$ = " "
                  `Do nothing
               else
                  select parameter
                     case 0
                        foreground_color$ = foreground_color$ + a$
                     endcase
                     case 1
                        background_color$ = background_color$ + a$
                     endcase
                  endselect
               endif
            endif
         next n
 
         foreground_color = val(foreground_color$)
         background_color = val(background_color$)
 
         ink foreground_color, background_color
      endif
 
      if left$(line$, 4) = "dot "
         line$ = right$(line$, len(line$) - 4)
 
         parameter = 0
 
         x$ = ""
         y$ = ""
 
         for n = 1 to len(line$)
            a$ = mid$(line$, n)
            if a$ = ","
               parameter = parameter + 1
            else
               if a$ = " "
                  `Do nothing
               else
                  select parameter
                     case 0
                        x$ = x$ + a$
                     endcase
                     case 1
                        y$ = y$ + a$
                     endcase
                  endselect
               endif
            endif
         next n
 
         x = (val(x$) * scale_x) / 100 + offset_x
         y = (val(y$) * scale_y) / 100 + offset_y
 
         dot x, y
      endif
 
      if left$(line$, 5) = "line "
         line$ = right$(line$, len(line$) - 5)
 
         parameter = 0
 
         x_1$ = ""
         y_1$ = ""
         x_2$ = ""
         y_2$ = ""
 
         for n = 1 to len(line$)
            a$ = mid$(line$, n)
            if a$ = ","
               parameter = parameter + 1
            else
               if a$ = " "
                  `Do nothing
               else
                  select parameter
                     case 0
                        x_1$ = x_1$ + a$
                     endcase
                     case 1
                        y_1$ = y_1$ + a$
                     endcase
                     case 2
                        x_2$ = x_2$ + a$
                     endcase
                     case 3
                        y_2$ = y_2$ + a$
                     endcase
                  endselect
               endif
            endif
         next n
 
         x_1 = (val(x_1$) * scale_x) / 100 + offset_x
         y_1 = (val(y_1$) * scale_y) / 100 + offset_y
         x_2 = (val(x_2$) * scale_x) / 100 + offset_x
         y_2 = (val(y_2$) * scale_y) / 100 + offset_y
 
         line x_1, y_1, x_2, y_2
      endif
 
      if left$(line$, 4) = "box "
         line$ = right$(line$, len(line$) - 4)
 
         parameter = 0
 
         _left$ = ""
         top$ = ""
         _right$ = ""
         bottom$ = ""
 
         for n = 1 to len(line$)
            a$ = mid$(line$, n)
            if a$ = ","
               parameter = parameter + 1
            else
               if a$ = " "
                  `Do nothing
               else
                  select parameter
                     case 0
                        _left$ = _left$ + a$
                     endcase
                     case 1
                        top$ = top$ + a$
                     endcase
                     case 2
                        _right$ = _right$ + a$
                     endcase
                     case 3
                        bottom$ = bottom$ + a$
                     endcase
                  endselect
               endif
            endif
         next n
 
         left = (val(_left$) * scale_x) / 100 + offset_x
         top = (val(top$) * scale_y) / 100 + offset_y
         right = (val(_right$) * scale_x) / 100 + offset_x
         bottom = (val(bottom$) * scale_y) / 100 + offset_y
 
         box left, top, right, bottom
      endif
 
      if left$(line$, 7) = "circle "
         line$ = right$(line$, len(line$) - 7)
 
         parameter = 0
 
         x$ = ""
         y$ = ""
         radius$ = ""
 
         for n = 1 to len(line$)
            a$ = mid$(line$, n)
            if a$ = ","
               parameter = parameter + 1
            else
               if a$ = " "
                  `Do nothing
               else
                  select parameter
                     case 0
                        x$ = x$ + a$
                     endcase
                     case 1
                        y$ = y$ + a$
                     endcase
                     case 2
                        radius$ = radius$ + a$
                     endcase
                  endselect
               endif
            endif
         next n
 
         x = (val(x$) * scale_x) / 100 + offset_x
         y = (val(y$) * scale_y) / 100 + offset_y
         x_radius = (val(radius$) * scale_x) / 100
         y_radius = (val(radius$) * scale_y) / 100
 
         ellipse x, y, x_radius, y_radius
      endif
 
      if left$(line$, 8) = "ellipse "
         line$ = right$(line$, len(line$) - 8)
 
         parameter = 0
 
         x$ = ""
         y$ = ""
         x_radius$ = ""
         y_radius$ = ""
 
         for n = 1 to len(line$)
            a$ = mid$(line$, n)
            if a$ = ","
               parameter = parameter + 1
            else
               if a$ = " "
                  `Do nothing
               else
                  select parameter
                     case 0
                        x$ = x$ + a$
                     endcase
                     case 1
                        y$ = y$ + a$
                     endcase
                     case 2
                        x_radius$ = x_radius$ + a$
                     endcase
                     case 3
                        y_radius$ = y_radius$ + a$
                     endcase
                  endselect
               endif
            endif
         next n
 
         x = (val(x$) * scale_x) / 100 + offset_x
         y = (val(y$) * scale_y) / 100 + offset_y
         x_radius = (val(x_radius$) * scale_x) / 100
         y_radius = (val(y_radius$) * scale_y) / 100
 
         ellipse x, y, x_radius, y_radius
      endif
   loop
 
   close file filenumber
endfunction