def fillImgArray(self, x, y, width, height, image, display = True):
buff = self.disp.buffer
actx = self.screenXFromImageCoords(x,y)
acty = self.screenYFromImageCoords(x,y)
image = Image.fromarray(image)
image = image.resize((width,height), Image.ANTIALIAS)
cr = self.currentRotation
if(cr == 1):
actx -= height
image = image.transpose(Image.ROTATE_270)
if(cr == 2):
acty -= height
actx -= width
image = image.transpose(Image.ROTATE_180)
if(cr == 3):
acty -= width
image = image.transpose(Image.ROTATE_90)
buff.paste(image, (actx,acty))
if(display):
self.disp.display()
## Rotates the screen orientation 90 degrees to the right (-90 degrees)
# @param self The object pointer.
# @remark
# To use this function in your program:
# @code
# ...
# screen.rotateRight()
# @endcode
评论列表
文章目录