A Python Virtual Canvas Painter with ability to save as Bitmap image.
CanvasPainter(columns,rows,bits=16,window=None)
setWindow(startX,endX,startY,endY,copy=True)
setColor(R,G,B,colorType=CanvasPainter.COLOR_LINE):
restoreColor(colorType=CanvasPainter.COLOR_LINE):
clearColor(colorType=CanvasPainter.COLOR_FILL):
setThikness(thikness):
restoreThikness():
-- Set rotation to given degress, with the given x and y as origin (x and y should be the center of the image to rotate) call with empty args to set normal painting
setRotation(degress=0,xOrigin=0,yOrigin=0):
setPixel(xPos,yPos):
drawLine(startX,endX,startY,endY):
drawLineH(xPos,yPos,size):
drawLineV(xPos,yPos,size):
drawRectangle(xPos,yPos,width,height,fill=False):
drawSquare(xPos,yPos,size,fill=False):
drawCircle(xPos,yPos,radius,fill=False,startAngle=0,endAngle=360):
loadRaw(xPos,yPos,width,height,rawBytes)
loadImage(xPos,yPos,file)
loadFont(file):
printChar(xPos,yPos,char):
printChars(xPos,yPos,chars):
flush():
saveBitmap(file):