mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: separate fancyBackground from renderScene
This commit is contained in:
parent
3c56efb9fe
commit
d6515e26b9
6 changed files with 174 additions and 15 deletions
|
@ -12,6 +12,7 @@ import {
|
|||
updateImageCache,
|
||||
} from "../element/image";
|
||||
import Scene from "./Scene";
|
||||
import { applyFancyBackground } from "./fancyBackground";
|
||||
|
||||
export const SVG_EXPORT_TAG = `<!-- svg-source:excalidraw -->`;
|
||||
|
||||
|
@ -54,6 +55,14 @@ export const exportToCanvas = async (
|
|||
|
||||
const onlyExportingSingleFrame = isOnlyExportingSingleFrame(elements);
|
||||
|
||||
if (appState.fancyBackgroundImageUrl) {
|
||||
await applyFancyBackground(
|
||||
canvas,
|
||||
appState.fancyBackgroundImageUrl,
|
||||
viewBackgroundColor,
|
||||
);
|
||||
}
|
||||
|
||||
renderStaticScene({
|
||||
canvas,
|
||||
rc: rough.canvas(canvas),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue