[Tutor] drawing a face
Kent Johnson
kent37 at tds.net
Fri Sep 30 18:41:06 CEST 2005
andrade1 at umbc.edu wrote:
> also I know i want an oval for the month but I only need half of one how
> would i just get half of the oval?
You are using John Zelle's graphics module, right? I don't think that module supports drawing part of an oval. As a work-around you could try drawing the whole oval, then draw a white rectangle that covers the half you don't want.
Good luck,
Kent
>
>
>
>
>
>
> from graphics import*
>
> def main():
> win = GraphWin()
> shape = Circle(Point(300,200), 40)
> shape.setOutline("black")
> shape.setFill("orange")
> shape.draw(win)
>
> leftEye = Cirlce(Point(285,210), 50)
> leftEye.setFill("yellow")
> leftEye.setOutline("orange")
> rightEye = leftEye.clone()
> leftEye.draw(win)
> rightEye.draw(win)
>
> sidenose = Line(245, 265)
> botnose = Line(245,0)
> sidenose.draw(win)
> botnose.draw(win)
>
> win.getMouse()
> win.close()
>
>
>
> main()
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
More information about the Tutor
mailing list