feat: solid background position in roundRect fallback
This commit is contained in:
parent
38fd4fb165
commit
7795d1aaef
@ -104,6 +104,7 @@ const addContentBackground = (
|
|||||||
const y =
|
const y =
|
||||||
(normalizedDimensions.height - contentSize.height) / 2 - FANCY_BG_PADDING;
|
(normalizedDimensions.height - contentSize.height) / 2 - FANCY_BG_PADDING;
|
||||||
|
|
||||||
|
// fixme: position is no scaled to the center
|
||||||
if (context.roundRect) {
|
if (context.roundRect) {
|
||||||
context.roundRect(
|
context.roundRect(
|
||||||
x,
|
x,
|
||||||
@ -119,10 +120,14 @@ const addContentBackground = (
|
|||||||
} else {
|
} else {
|
||||||
roundRect(
|
roundRect(
|
||||||
context,
|
context,
|
||||||
FANCY_BG_PADDING * exportScale,
|
x,
|
||||||
FANCY_BG_PADDING * exportScale,
|
y,
|
||||||
normalizedDimensions.width - FANCY_BG_PADDING * 2 * exportScale,
|
(contentSize.width +
|
||||||
normalizedDimensions.height - FANCY_BG_PADDING * 2 * exportScale,
|
(DEFAULT_EXPORT_PADDING + FANCY_BG_BORDER_RADIUS) * 2) *
|
||||||
|
exportScale,
|
||||||
|
(contentSize.height * exportScale +
|
||||||
|
(DEFAULT_EXPORT_PADDING + FANCY_BG_BORDER_RADIUS) * 2) *
|
||||||
|
exportScale,
|
||||||
FANCY_BG_BORDER_RADIUS * exportScale,
|
FANCY_BG_BORDER_RADIUS * exportScale,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user