mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: scale up small exports with fancy background
This commit is contained in:
parent
d27856a967
commit
4c8cf9c91c
6 changed files with 64 additions and 14 deletions
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
DEFAULT_EXPORT_PADDING,
|
||||
FANCY_BACKGROUND_IMAGES,
|
||||
FANCY_BG_BORDER_RADIUS,
|
||||
FANCY_BG_PADDING,
|
||||
|
@ -12,6 +13,10 @@ import { getScaleToFill } from "../packages/utils";
|
|||
import { roundRect } from "../renderer/roundRect";
|
||||
import { AppState, Dimensions } from "../types";
|
||||
|
||||
export const getFancyBackgroundPadding = (
|
||||
exportPadding = DEFAULT_EXPORT_PADDING,
|
||||
) => FANCY_BG_PADDING + FANCY_BG_BORDER_RADIUS + exportPadding;
|
||||
|
||||
const addImageBackground = (
|
||||
context: CanvasRenderingContext2D,
|
||||
canvasDimensions: Dimensions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue