Ask coding questions

← Back to all posts
How do you make a parallelogram in python tkinter?
ia13ru (43)

I have this function:

def draw():
   #insert all of the variables being specified here
   return self.canvas.create_rectangle(x1, y1, x2, y2, fill=c)

Self.canvas is a canvas.
How would I do something similar with parallelograms?

Answered by DynamicSquid (4640) [earned 5 cycles]
View Answer
DynamicSquid (4640)

I don't think there is a prebuilt function for it, so you might have to implement it yourself.

svensk007 (10)

I would use an import such as pygame (import pygame)
And then use pygame to draw it
Also I've used Tkinter before and it has a like 2000s era GUI so pygame again would probably be for the better even if you have to "learn" a new Library. Or if you need VSYNC use pyglet