I want to draw a polygon which is not a rectangle but a quadrilateral. But how can I give it transparency. I found out that draw function doesn't allow us to do this much, so how can I do that
Asked
Active
Viewed 106 times
0
-
Read [Draw a transparent rectangle in pygame](https://stackoverflow.com/questions/6339057/draw-a-transparent-rectangle-in-pygame/64630102#64630102). There are solutions for all shape types. The solution is independent of the shape. See the function [`draw_polygon_alpha`](https://stackoverflow.com/questions/6339057/draw-a-transparent-rectangle-in-pygame/64630102#64630102) – Rabbid76 Jul 28 '21 at 19:13
-
@Rabbid76 But the solution, in starting, gives the size to surface and since I ant to draw the polygon how can I give the size to it – Samyak Marathe Jul 28 '21 at 19:17
-
@You don't need a size. All you need is a list of points. Pease read the answer (Not the 1st answer, the 2nd answer). Search for the [`draw_polygon_alpha`](https://stackoverflow.com/questions/6339057/draw-a-transparent-rectangles-and-polygons-in-pygame/64630102#64630102) function. Anyway, you have to mention this in your question. Please read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) – Rabbid76 Jul 28 '21 at 19:19