This commit is contained in:
iqudoo
2026-06-16 23:41:27 +08:00
parent 43900a8b52
commit 3a50e7e33b
7 changed files with 78 additions and 38 deletions

View File

@@ -241,8 +241,7 @@ type DrawLayerFn = (
) => void | Promise<void>;
/**
* 绘制元素图层:无蒙版时直接绘制;有蒙版时先在离屏画布绘制整层,应用蒙版后再合成到主画布。
* 仅对当前元素的 layer 回调内容生效,边框等装饰应在合成后单独绘制。
* 绘制元素图层:无蒙版时直接绘制;有蒙版时先在离屏画布绘制整层(背景、内容、边框),应用蒙版后再合成到主画布。
*/
export async function composeElementLayer(
mainCtx: CanvasRenderingContext2D,