Draw non horizontal thick lines

Open
#433 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust

Research direction

Start by reviewing issue #97 and the existing draw_filled_rect approach described here, then compare the requested two-point, thickness-based behavior with Pillow's ImageDraw.line reference. Done means imageproc supports drawing non-horizontal thick lines from two points with a specified thickness and documents any relevant workaround or limitations.

Written by the indexing model from the issue text.

Description

Hi,
Thanks for the nice library.

Following the issue https://github.com/image-rs/imageproc/issues/97, I understand the only way to draw a thick line is by using code similar to this:
draw_filled_rect(&img, Rect::at(128, 10).of_size(118, thickness), Rgb([240, 240, 255]));

But such rectangles are necessarily horizontal from what I understand.
Would it be possible to have a functionality such as this?
https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html#PIL.ImageDraw.ImageDraw.line
(two points and a thickness)

Otherwise what could be a workaround?

Thank you

Dominant language
Rust
Stars
979
Forks
181
Avg merge
5m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from image-rs/imageproc

All issues in image-rs/imageproc

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.