korlibs / korlibs/korge

shape with stroke has incorrect container

Open
#372 2 comments 0 reactions 0 assignees View on GitHub
bug check
Dominant language
Kotlin
Stars
3k
Forks
148
Avg merge
13h 44m
Merged PRs (30d)
1

Description

Hi,
I created a roundRect with a stroke and I found that items centered inside of it are slightly misplaced to the lower right corner.
I inspected it with the inspector (F12) and saw that its box is too large on the right and bottom edges.

my rectangle :
`roundRect(
width = cardWidth,
height = cardHeight,
rx = cardCornerRadius,
fill = color,
stroke = Colors.AQUA,
strokeThickness = 5.0
)`

the result :
![image](https://user-images.githubusercontent.com/21320222/122826965-157fb700-d2e4-11eb-9227-a82c6f4c4543.png)

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the roundRect example with a stroke and inspect its container bounds using the inspector. Trace the shape sizing and stroke handling from the roundRect entry point; done means the container matches the rendered shape and centered items are no longer shifted toward the lower right.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.