Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 9.8; Fig 9.12: Wrong order of method arguments for Image.star #75

Open
Christovis opened this issue Aug 16, 2020 · 1 comment
Open

Comments

@Christovis
Copy link

Christovis commented Aug 16, 2020

In the PDF on page 105 in Chapter 9.8 the following code snipped is supposed to generate the stars shown in Fig. 9.12:

val star = Image
    .star(100, 50, 5, 0.degrees)
   [...]

however the order in which the arguments are given seems to be wrong when looking at the source code: https://github.com/creativescala/doodle/blob/79e41e13637592519cf809b0e2b34c5f4958b418/image/shared/src/main/scala/doodle/image/Image.scala#L203

I fixed it thus using the following order to create something like shown in the Fig. 9.12:

val star = Image
    .star(5, 100, 50, 0.degrees)
   [...]
@noelwelsh
Copy link
Contributor

Thanks for reporting. I'm going to experiment with a custom mdoc modifier (https://scalameta.org/mdoc/docs/modifiers.html#postmodifier) to render images, which should completely avoid this type of error in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants