Ejemplo n.º 1
0
def ex_15_4_1(canvas):
    box = Rectangle()
    box.width = 300
    box.height = 200
    box.corner = Point()
    box.corner.x = -150
    box.corner.y = -100

    box.color = 'green4'

    draw_rect(canvas, box)
    
    pt = Point()
    pt.x = -25
    pt.y = 0

    draw_point(canvas, pt)
Ejemplo n.º 2
0
def ex_15_4_1(canvas):
    box = Rectangle()
    box.width = 300
    box.height = 200
    box.corner = Point()
    box.corner.x = -150
    box.corner.y = -100

    box.color = 'green4'

    draw_rect(canvas, box)

    pt = Point()
    pt.x = -25
    pt.y = 0

    draw_point(canvas, pt)
Ejemplo n.º 3
0
def create_rect(x, y, w, h):
    rect = Rectangle()
    rect.width = w
    rect.height = h
    rect.corner = create_point(x, y)
    return rect
Ejemplo n.º 4
0
def create_rect(x, y, w, h):
    rect = Rectangle()
    rect.width = w
    rect.height = h
    rect.corner = create_point(x, y)
    return rect