Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def newLine(pic,x,y,c):
- #@param pic: picture
- #@param x , y: int
- #@param c: color
- axisX=x
- axisY=y
- if x>=getWidth(pic)-1 or x<0 or y>=getHeight(pic)-1 or y<0:
- print 'parameter error'
- return
- for param in range(x,getWidth(pic)):
- if axisX!=getWidth(pic)-1 and axisY!=getHeight(pic)-1:
- px=getPixel(pic,axisX,axisY)
- setColor(px,c)
- axisX+=1
- axisY+=1
- elif axisX==getWidth(pic)-1 or axisY==getHeight(pic)-1:
- show(pic)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement