mirror of
https://github.com/Hopiu/rpi-rgb-led-matrix.git
synced 2026-03-16 22:10:27 +00:00
try to understand how to rotate painting on the canvas
This commit is contained in:
parent
f0fb434916
commit
4d0c0fd01f
1 changed files with 3 additions and 0 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue