mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +00:00
LibGfx: Fix drawing rounded corners when using display scaling
This commit is contained in:
parent
49539abee0
commit
40f7977508
Notes:
sideshowbarker
2024-07-18 11:38:16 +09:00
Author: https://github.com/gunnarbeutner
Commit: 40f7977508
Pull-request: https://github.com/SerenityOS/serenity/pull/8212
Reviewed-by: https://github.com/Lubrsi
1 changed files with 4 additions and 0 deletions
|
@ -352,6 +352,10 @@ void Painter::fill_rounded_corner(const IntRect& a_rect, int radius, Color color
|
||||||
if (translated_a_rect.y() < rect.y())
|
if (translated_a_rect.y() < rect.y())
|
||||||
clip_offset = rect.y() - translated_a_rect.y();
|
clip_offset = rect.y() - translated_a_rect.y();
|
||||||
|
|
||||||
|
radius *= scale();
|
||||||
|
rect *= scale();
|
||||||
|
clip_offset *= scale();
|
||||||
|
|
||||||
RGBA32* dst = m_target->scanline(rect.top()) + rect.left();
|
RGBA32* dst = m_target->scanline(rect.top()) + rect.left();
|
||||||
const size_t dst_skip = m_target->pitch() / sizeof(RGBA32);
|
const size_t dst_skip = m_target->pitch() / sizeof(RGBA32);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue