def main(): from turtle import Screen, done, hideturtle from rhombus import Rhombus from point import Point loz = Rhombus(Point(-150, 200), 0, 100, 40, backgroundColor='Yellow') rloz = WithRotation(loz, alpha=90) # tests draw win = Screen() hideturtle() loz.draw() rloz.draw() done()
def main(): from turtle import Screen, done, hideturtle from rhombus import Rhombus from point import Point loz = Rhombus(Point(-150, 200), 0, 100, 40, backgroundColor='Yellow') tloz = WithTranslation(loz, dx=0, dy=100.0, backgroundColor='Blue') print(tloz) # tests draw win = Screen() hideturtle() loz.draw() tloz.draw() done()
def main(): from turtle import Screen, done, hideturtle from rhombus import Rhombus from withtranslation import WithTranslation from point import Point loz = Rhombus(Point(-150, 200), 0, 100, 40, lineColor='pink', fillColor='blue') tploz = WithTransparency(WithTranslation(deepcopy(loz), +100, -100)) # tests draw win = Screen() hideturtle() loz.draw() tploz.draw() done()