graphics: emit a warning when a quad have not enough point in the list (instead of having an exception during build()

This commit is contained in:
Mathieu Virbel 2011-12-08 12:07:41 +01:00
parent 4383b1896f
commit 03730cb020
1 changed files with 4 additions and 0 deletions

View File

@ -723,6 +723,10 @@ cdef class Quad(VertexInstruction):
return self._points
def __set__(self, points):
self._points = list(points)
if len(self._points) != 8:
raise GraphicException(
'Quad: invalid number of points (%d instead of 8' % len(
self._points)))
self.flag_update()