Return the bounding vertices of the texture square.
(x, y, n=4)
| 51 | |
| 52 | |
| 53 | def tex_coord(x, y, n=4): |
| 54 | """ Return the bounding vertices of the texture square. |
| 55 | |
| 56 | """ |
| 57 | m = 1.0 / n |
| 58 | dx = x * m |
| 59 | dy = y * m |
| 60 | return dx, dy, dx + m, dy, dx + m, dy + m, dx, dy + m |
| 61 | |
| 62 | |
| 63 | def tex_coords(top, bottom, side): |