Donovan Malcolm
Donovan Malcolm

Reputation: 21

Python Turtle fill the triangle with color?

I am currently using the turtle.goto cords from a text file. I have the triangle drawn and everything but I don't know how to fill the triangle.

Upvotes: 2

Views: 869

Answers (1)

Nathan Hinchey
Nathan Hinchey

Reputation: 1201

You are ending fill after every new coordinate. You need to call t.begin_fill() before your for loop and call t.end_fill() after the last coordinate, otherwise you are just filling in your single line with each iteration.

Upvotes: 2

Related Questions