# shapes1.py
from Processing import *
import math

window(500, 500)

# Rectangle Class
class Rectangle:
    def __init__(self, pts):
        self.pts = pts
        self.strokeColor = color(32)
        self.fillColor = color(255, 128, 128)
        
    def draw(self):
        rectMode(CORNER)
        fill( self.fillColor )
        stroke( self.strokeColor )
        w = self.pts[1][0] - self.pts[0][0]
        h = self.pts[1][1] - self.pts[0][1]
        rect(self.pts[0][0], self.pts[0][1], w, h)

shapes = []
def draw(o, e):
  background(200)
  for s in shapes:
      s.draw()

frameRate(20)
onLoop += draw
loop()

shapes.append( Rectangle ( [[100, 200], [200, 250]] ) )