Пример #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)
Пример #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)
Пример #3
0
def create_point(x, y):
    pt = Point()
    pt.x = x
    pt.y = y
    return pt
Пример #4
0
def create_point(x, y):
    pt = Point()
    pt.x = x
    pt.y = y
    return pt