Skip to content

Commit

Permalink
More fixes to Writing Methods
Browse files Browse the repository at this point in the history
- Use mdoc, not tut, to code is correctly rendered

- Fix reference to image
  • Loading branch information
noelwelsh committed Nov 30, 2023
1 parent e100a00 commit f1f6905
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/src/pages/methods/writing-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def gradientBoxes(color: Color): Image = {

@:exercise(Gradient Concentric Circles)

Now implement methods to draw a picture similar to @:fref(methods:gradient-concentric-circles).
Now implement methods to draw a picture similar to the one below.
You should follow a design similar to `gradientBoxes` to reduce the amount of code you write, but we're not going to give the method skeletons this time; you have to work it out yourself.

@:figure{ img = "gradient-concentric-circles.svg", key = "#fig:methods:gradient-concentric-circles", caption = "Five concentric circles filled with a gradient starting from Royal Blue" }
Expand All @@ -115,7 +115,7 @@ The exact implementation of these two methods, particularly `circle` is where we

Here's our implementation.

```tut:silent:book
```scala mdoc:silent
def circle(color: Color, n: Int): Image =
Image.circle(50 + (n * 10)).
strokeColor(color.spin((15 * n).degrees)).
Expand Down

0 comments on commit f1f6905

Please sign in to comment.