Rewrite the mirror functions as methods in the MyPicture class.
Note: What mirror “functions” this question refers to are unclear, simply rewriting two of the mirror functions used in the book is sufficient.
```
class MyPicture(Picture):
def mirrorHorizontal(self):
mirrorPoint = getHeight(self) / 2
height = getHeight(self)
for x in range(0,getWidth(self)):
for y in range(0,mirrorPoint):
topPixel = getPixel(self ,x,y)
bottomPixel = getPixel(self,x,height - y - 1)
color = getColor(topPixel)
setColor(bottomPixel ,color)
def mirrorVertical(self):
mirrorPoint = getWidth(self) / 2
width = getWidth(self)
for y in range(0,getHeight(self)):
for x in range(0,mirrorPoint):
leftPixel = getPixel(self ,x,y)
rightPixel = getPixel(self,width - x - 1,y)
color = getColor(leftPixel)
setColor(rightPixel ,color)
```
You might also like to view...
The default Remote Desktop listening port is ______________
a. 8080 b. 3389 c. 443 d. 21
What advantages does the "IPsec task offloading" hardware acceleration feature offer?
What will be an ideal response?