Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def barraDiag(pict,w,col):
- # @param pict: Picture
- # @param w: int; larghezza della diagonale
- # @param col: Color
- for h in range(0,getHeight(pict)):
- drawLine(pict,h,h,w,col)
- repaint(pict)
- def drawLine(pict,x,y,w,col):
- # @param pict:Picture
- # @param x: Int; Coordinata dell'immagine
- # @param y: Int; Coordinata dell'immagine
- # @param w: int; lunghezza della riga
- # @param col: Color
- for i in range(x,min(x+w,getWidth(pict))):
- pix=getPixel(pict,i,y)
- setColor(pix,col)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement