[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Polygon Area Calculation?



In Pygame SVN, there are new Mask functions.  You could turn the
polygon surface into a mask with mask.from_threshold() or
mask.from_surface(), and then get the size in pixels with
mask.count().

Nirav

On Mon, Sep 29, 2008 at 8:57 PM, Mark S <slygroups@xxxxxxxxx> wrote:
> Hi all,
>
> I'm wondering if there is anything built in to pygame that will report the
> area of a polygon?
>
> Thanks,
>
> mark