`Cap::Butt` is rendered wrong
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
```rust
let stroke = Stroke {
width: 50.0,
join: vello::kurbo::Join::Miter,
miter_limit: 10.,
start_cap: vello::kurbo::Cap::Butt,
end_cap: vello::kurbo::Cap::Butt,
..Default::default()
};
let mut path = BezPath::new();
path.move_to(Point::new(110., 50.));
path.line_to(Point::new(110., 60.));
path.line_to(Point::new(100., 60.));
scene.stroke(&stroke, Affine::IDENTITY, Color::WHITE, None, &path);
```
makes this:

but html 2d canvas:

using this code
```html
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
ctx.fillStyle = '#000';
ctx.fillRect(0, 0, 500, 300);
ctx.lineWidth = 50;
//ctx.lineJoin = 'bevel';
//ctx.lineCap = "round";
ctx.strokeStyle = '#fff';
ctx.beginPath();
ctx.moveTo(110, 50);
ctx.lineTo(110, 60);
ctx.lineTo(100, 60);
ctx.stroke();
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the Rust Stroke and BezPath snippet, then compare its Cap::Butt output with the HTML canvas example. Trace the scene.stroke path and stroke-cap handling to find where the rendered geometry diverges. Done means the same path renders with butt caps matching the canvas result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100