I often hit this issue when created a rounded button:
Steps:
- Created a rounded rectangle using getLocalBounds() as the bounds of the rect.
- Fill the path
- Stroke the path
Because JUCE uses centered stroking with no option for inner strokes, this leads to some really crumby code requiring reducing the rectangle as a function of the stroke size, I’ve also tried affine transforms on the stroke function – generally all off these lead to really strange and irritating issues.
Is anyone aware of a safe / easy method to stroke a path with an inner stroke instead of centered?