try to understand how to rotate painting on the canvas

This commit is contained in:
Hopiu 2017-01-05 22:27:23 +01:00
parent f0fb434916
commit 4d0c0fd01f

View file

@ -40,6 +40,9 @@ cdef class FrameCanvas(Canvas):
def SetPixel(self, int x, int y, uint8_t red, uint8_t green, uint8_t blue):
(<cppinc.FrameCanvas*>self.__getCanvas()).SetPixel(x, y, red, green, blue)
def SetRotatedPixel(self, int x, int y, uint8_t red, uint8_t green, uint8_t blue):
(<cppinc.FrameCanvas*>self.__getCanvas()).SetPixel(self.width - x - 1, self.height - y - 1, red, green, blue)
property width:
def __get__(self): return (<cppinc.FrameCanvas*>self.__getCanvas()).width()