Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #41
Browse files Browse the repository at this point in the history
milasudril committed Jan 5, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 646fdd9 commit dfb29da
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions imgproc/render_lineseg_trees.imgproc.md
Original file line number Diff line number Diff line change
@@ -105,22 +105,22 @@ enum class Direction : int
? ModulationParams{mod_params.width_growth, mod_params.intensity_growth}
: ModulationParams{-mod_params.width_growth, -mod_params.intensity_growth};

(void)draw(points.front().second.data, args, mod_state, mod_params, Direction::Forward);

std::ranges::for_each(
range,
[start = points.front().first,
&args,
&mod_state,
mod_params,
growth_factor = ModulationParams{std::exp2(growth_factors_singed.width_growth / length),
std::exp2(growth_factors_singed.intensity_growth
/ length)}](auto const& item) mutable {
mod_state = draw(item.first, start, args, mod_state, growth_factor);
start = item.first;
(void)draw(item.second.data, args, mod_state, mod_params, Direction::Forward);
start = item.first;
});

std::ranges::for_each(points, [args, mod_state, mod_params](auto const& item) {
(void)draw(item.second.data, args, mod_state, mod_params, Direction::Forward);
});

return mod_state;
}

0 comments on commit dfb29da

Please sign in to comment.