mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
render fill directly from animated trail
This commit is contained in:
parent
7a9df73e0b
commit
1e1dab3bbc
11 changed files with 11 additions and 194 deletions
|
@ -705,33 +705,6 @@ export const renderSelectionElement = (
|
|||
context.restore();
|
||||
};
|
||||
|
||||
export const renderLassoSelection = (
|
||||
lassoPath: AppState["lassoSelection"],
|
||||
context: CanvasRenderingContext2D,
|
||||
appState: InteractiveCanvasAppState,
|
||||
selectionColor: InteractiveCanvasRenderConfig["selectionColor"],
|
||||
) => {
|
||||
if (!lassoPath || lassoPath.points.length < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
context.save();
|
||||
context.translate(appState.scrollX, appState.scrollY);
|
||||
context.beginPath();
|
||||
|
||||
for (const point of lassoPath.points) {
|
||||
context.lineTo(point[0], point[1]);
|
||||
}
|
||||
|
||||
context.closePath();
|
||||
|
||||
context.globalAlpha = 0.05;
|
||||
context.fillStyle = selectionColor;
|
||||
context.fill();
|
||||
|
||||
context.restore();
|
||||
};
|
||||
|
||||
export const renderElement = (
|
||||
element: NonDeletedExcalidrawElement,
|
||||
elementsMap: RenderableElementsMap,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue