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

docs: update gradient tutorial #703

Merged
merged 1 commit into from
Jul 2, 2022
Merged

Conversation

marco-langer
Copy link
Contributor

@marco-langer marco-langer commented Jun 29, 2022

Description

This PR updates the gradient tutorial with currently used style (east-const, trailing return types, alias declarations) and fixes some other minor issues.

Currently a draft, I will update it in the next days.

Tasklist

  • Review and approve

@marco-langer marco-langer marked this pull request as draft June 29, 2022 18:05
@marco-langer marco-langer force-pushed the fix-doc branch 2 times, most recently from 01d7e82 to 0171ed4 Compare July 2, 2022 08:34
@marco-langer marco-langer marked this pull request as ready for review July 2, 2022 09:08
@marco-langer
Copy link
Contributor Author

marco-langer commented Jul 2, 2022

PR is ready for review.

Some of the code snippets didn't compile anymore, because the referenced functions either moved into the detail namespace (like channel_convert_to_unsigned) or did not exist anymore at all (like in the mandelbrot example).
I replaced the mandelbrot snippet with the mandelbrot example from the example directory and changed the tutorial accordingly to calculate the gradient of the luminosity of a rgb8 image rather than the gradient of a grayscale image.

Now all code snippets compile without warnings.

@mloskot
Copy link
Member

mloskot commented Jul 2, 2022

Some of the code snippets didn't compile anymore

Maintenance of the documentation snippets is a bit of PITA.
Some Boost projects switched to AsciiDoc and link snippets from .cpp files which are compile-tested by CI jobs,
For example, see Boost.Build's example/hello and its readme.adoc.

I'm not sure if similar is feasible using reStructuredText, or we should switch over to AsciiDoc ;)

Now all code snippets compile without warnings.

Sweet, thank you!

@mloskot mloskot added this to the Boost 1.80 milestone Jul 2, 2022
@mloskot mloskot merged commit fdefeab into boostorg:develop Jul 2, 2022
@marco-langer
Copy link
Contributor Author

Regarding this channel_convert_to_unsigned, which is now in the detail namespace, but also still referenced in this tutorial:

Maybe one should think to pull it out of the detail namespace again, if it is that useful for client code? I don't know the rational why it was moved into the detail namespace at all (this was done 15 years ago!).

@mloskot
Copy link
Member

mloskot commented Jul 4, 2022

Good catch @marco-langer I have created a new issue #706 to address your questions in future.
Meanwhile, let's keep it in the detail - it is easy to move a thing out of detail but the other way around is much harder :)

mloskot added a commit that referenced this pull request Jul 4, 2022
* develop:
  fix: broken build for midpoint_ellipse_rasterizer::draw_curve (#705)
  docs: fixed gradient tutorial (#703)
  fix: Unused variable warning (#704)
@mloskot mloskot mentioned this pull request Jul 5, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants