def transform(self): gl.glTranslatef(self.x, self.y, 0) if self.rotation != 0.0: gl.glRotatef(self.rotation, 0, 0, -1) if self.scale != (1.0, 1.0): gl.glScalef(self.scale[0], self.scale[1], 0)
def draw(self): if self.visible: gl.glPushMatrix() gl.glColor4fv(self.color) self.transform() gl.glTranslatef(-self.anchor_x, -self.anchor_y, 0) self.image.draw() # gl.glCallList(self.image.display_list) gl.glPopMatrix()