close() on path doesn't interact with stroking as expected.
smcallis opened this issue · comments
smcallis commented
The close() command on BLPath says that it works like the 'Z' command in SVG and links here. Which indicates that stroking a closed path should join back to the start of the curve. But if I don't manually do a lineTo back to the start, my strokes don't paint fully, which you can see here:
Petr Kobalicek commented
Interesting. I couldn't observe this behavior, so I think this would need a snippet that can reproduce it.
For example this fiddle snippet produces the correct output:
BLImage render(const BLContextCreateInfo& cci) {
BLImage img(500, 500, BL_FORMAT_PRGB32);
BLContext ctx(img, cci);
ctx.clearAll();
BLPath p;
p.moveTo(200, 100);
p.lineTo(300, 200);
p.lineTo(100, 200);
p.close();
p.moveTo(200, 300);
p.lineTo(300, 400);
p.lineTo(100, 400);
p.close();
ctx.strokePath(p, BLRgba32(0xFFFFFFFF));
return img;
}
smcallis commented
I'll see if I can get a snippet to reproduce today.
…On Mon, May 20, 2024 at 2:23 AM Petr Kobalicek ***@***.***> wrote:
Interesting. I couldn't observe this behavior, so I think this would need
a snippet that can reproduce it.
For example this fiddle snippet produces the correct output:
BLImage render(const BLContextCreateInfo& cci) {
BLImage img(500, 500, BL_FORMAT_PRGB32);
BLContext ctx(img, cci);
ctx.clearAll();
BLPath p;
p.moveTo(200, 100);
p.lineTo(300, 200);
p.lineTo(100, 200);
p.close();
p.moveTo(200, 300);
p.lineTo(300, 400);
p.lineTo(100, 400);
p.close();
ctx.strokePath(p, BLRgba32(0xFFFFFFFF));
return img;
}
—
Reply to this email directly, view it on GitHub
<#201 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEMKRJSID7KKRZG4S6SR3ZDGXHRAVCNFSM6AAAAABHS6IF76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZHEZTCNZSGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
smcallis commented
I haven't been able to reproduce this so I think it must have been on my end, though I'm not sure exactly how. I'll refile if I come across a reproduction.