Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def drawHorizontalLineGen(pict,x,y,w,col):
- #paramentro Picture,int prima coordinata,int seconda coordinata, int w lunghezza linea,Color
- for c in range(x,min(x+w,getWidth(pict))):
- setColor(getPixel(pict,c,y),col)
- def drawVerticalLineGen(pict,x,y,w,col):
- for f in range(y,min(y+w,getHeight(pict))):
- setColor(getPixel(pict,min(x,getHeight(pict)),f),col)
- def drawScalini(pic,x,y,w,z,col):
- #x inizio coordinata int, y inizio coordinata y int, w int larghezza scalino,z int altezza scalino
- for i in range(0,(getWidth(pic))):
- drawHorizontalLineGen(pic,x,y,w,col)
- x=x+w
- drawVerticalLineGen(pic,x,y,z,col)
- y=y+z
- repaint(pic)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement