@@ -29,10 +29,10 @@ def getLine(self, start, end):
29
29
p0 = self .nailToCoordinate (start )
30
30
p1 = self .nailToCoordinate (end )
31
31
sum = [0.0 , 0.1 ]
32
- def pixel (img , p , color , alpha_correction , transparency ):
32
+ def pixel (img , p , color , transparency ):
33
33
sum [0 ] += transparency * img .getpixel (p )
34
34
sum [1 ] += transparency
35
- self .bresenham (p0 , p1 , function = pixel )
35
+ self .bresenham (p0 , p1 , 20 , 1 , pixel )
36
36
return sum [0 ]/ sum [1 ]
37
37
38
38
def drawLine (self , start , end , color = 20 , alpha_correction = 1 , function = None ):
@@ -56,8 +56,8 @@ def invert(self):
56
56
self .image = ImageOps .invert (self .image )
57
57
58
58
def bresenham (self , p0 , p1 , color = 20 , transparency = 1 , function = None ):
59
- pass # implement anti aliasing of task 1 here
59
+ pass # Implement anti aliasing
60
60
61
61
def printOperations (self , file = None ):
62
- pass # first output number of nails then each in a new line the start and end nail of a line seperated by a " "
63
-
62
+ pass # the first line should contain the number of nails
63
+ # The other line should be start_nail whitespace end_nail of a line
0 commit comments