Skip to content

Commit daf0daa

Browse files
authored
Fix parameters order in execute methods for drawing classes (#1474)
1 parent a9a3a48 commit daf0daa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

book/visual-effects.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ documentation for more on the Skia API.
465465

466466
``` {.python replace=%2c%20scroll/,%20-%20scroll/}
467467
class DrawLine:
468-
def execute(self, canvas, scroll):
468+
def execute(self, scroll, canvas):
469469
path = skia.Path().moveTo(
470470
self.rect.left(), self.rect.top() - scroll) \
471471
.lineTo(self.rect.right(),
@@ -494,7 +494,7 @@ We do something similar to draw text using `drawString`:
494494

495495
``` {.python replace=%2c%20scroll/,%20-%20scroll/}
496496
class DrawText:
497-
def execute(self, canvas, scroll):
497+
def execute(self, scroll, canvas):
498498
paint = skia.Paint(
499499
AntiAlias=True,
500500
Color=parse_color(self.color),
@@ -519,7 +519,7 @@ Finally, for drawing rectangles you use `drawRect`:
519519

520520
``` {.python replace=%2c%20scroll/,rect.makeOffset(0%2c%20-scroll)/rect}
521521
class DrawRect:
522-
def execute(self, canvas, scroll):
522+
def execute(self, scroll, canvas):
523523
paint = skia.Paint(
524524
Color=parse_color(self.color),
525525
)

0 commit comments

Comments
 (0)