Post Reply 
How to use graphic.draw_filled_polygon?
09-04-2021, 08:53 PM (This post was last modified: 09-04-2021 09:44 PM by Guenter Schink.)
Post: #6
RE: How to use graphic.draw_filled_polygon?
(09-04-2021 07:43 PM)jfelten Wrote:  Here is what I got:
Code:
>from graphic import *
>draw_filled_polygon([[0,0],[0,240],[160,120]],(0,0,0))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can't convert tuple to int

That's weird! The following code works on the virtual Prime and on the G1, but crashes the G2
Code:
>from graphic import *
>draw_filled_polygon([[0,0],[0,240],[160,120]],0xff)
gives a nice blue triangle.

"draw_polygon" however works as expected. When I was working on my "Mandelbrot Explorer" I tried a lot with the "graphic" module but gave up. It was completely useless.

G√ľnter

Where did you find the documentation?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to use graphic.draw_filled_polygon? - Guenter Schink - 09-04-2021 08:53 PM



User(s) browsing this thread: 1 Guest(s)