def drawCircle(self, x, y, radius, fill = None, outline = (0,0,0), display = True):
draw = self.disp.draw()
actx = self.screenXFromImageCoords(x,y)
acty = self.screenYFromImageCoords(x,y)
draw.ellipse((actx-radius,acty-radius,actx+radius,acty+radius), fill=fill, outline=outline)
if(display):
self.disp.display()
## Draw a bitmap image on the screen (.png files rcommended)
# @param self The object pointer.
# @param x The upper left x coordinate of the image.
# @param y The upper left y coordinate of the image.
# @param width The width of the image.
# @param height The width of the image.
# @param path The image file path. Optional, defaults to the popup background image.
# @param display Choose to immediately push the drawing to the screen. Optional, defaults to True.
# @remark
# To use this function in your program:
# @code
# ...
# screen.screen.fillBmp(30, 0, 240, 240, path = os.path.join(currentdir, "dog.png"))
# @endcode
评论列表
文章目录