Lab5 - Copy into and Scaling

Original

 

Matte

 

Function:

def copyIntoMatte (picture,matteWidth):
...canvas = makeEmptyPicture(getWidth(picture)+matteWidth+matteWidth,getHeight(picture)+matteWidth+matteWidth, black)
...newCanvas = copyInto(picture, newCanvas, matteWidth + 1, matteWidth+1)
...return newCanvas

#This Function copies the original into a new black canvas with a matte of desired length

 

 

 

Original ..........................................................................Quarter/Tiled

 

Function:

def tileWithQuarters(picture):
...newCanvas = makeEmptyPicture(getWidth(picture),getHeight(picture))
...q = quarter(picture)
...newCanvas = copyInto(q, newCanvas, 1, 1)
...newCanvas = copyInto(q, newCanvas, getWidth(q)+1, 1)
...newCanvas = copyInto(q, newCanvas, 1, getHeight(q)+1)
...newCanvas = copyInto(q, newCanvas, getWidth(q)+1, getHeight(q)+1)
...return newCanvas

#This Function copies the original picture and makes it a quarter of the size. It then Tiles it onto a new canvas 4 times with copyInto

 

 

 

 

 

 

 

Cool Bloopers: