[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] pygame.mask.from_surface
- To: pygame-users@xxxxxxxx
- Subject: [pygame] pygame.mask.from_surface
- From: Nicholas Seward <nicholas.seward@xxxxxxxxx>
- Date: Mon, 14 May 2012 09:12:01 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Mon, 14 May 2012 10:12:09 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=38MBnVZ0O1aPTvateAysLO0M+G6q+0MvcEZICNLkYeg=; b=ON8x/zgl4Vh03I8Ij3XA8eFZkOwMlrGPOUtWu4lTb4TXozkTOhj483yc5i403lmIwi 2+wuHSaS8o3e0lgYZpg22jrgo5JzNx9qG0CDyB4FHN+HxJzEnyMbqcm0NfV3+oOmtW/U zyR1iPjDKPwySIH7xDUMyGH7XrSbaTKYl4C7DLGvvzlP6OIiRXKWG/b4DMxqT2XSWL/p Sjg1PIdN4jl9iQMefquCvRA42z3bmMPrAifVS1F10S7qe4FZo0abGliU8qeRhRIpzkYX BiSrQiori+GtWBnE6KLMhV8qOfZ43j4sDAAQJr/Fm8lI8sVT4kT+yOkdV1wbxjXmVLH9 6PZg==
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
One of my students was doing pixel perfect collisions with Sprites and
found what may be a bug. pygame.mask.from_surface seemed to return an
empty mask when everything on a surface is opaque. In this situation
rectangle collisions made more sense but I am still curious why
pygame.mask.from_surface is behaving this way. I quickly dug through
the source and nothing popped out as the cause.