apply filters to operations

This commit is contained in:
dunkeroni
2025-08-10 01:43:11 -04:00
committed by psychedelicious
parent f3d83dc6b7
commit af99beedc5
3 changed files with 3 additions and 3 deletions

View File

@@ -571,7 +571,7 @@ export abstract class CanvasEntityAdapterBase<T extends CanvasEntityState, U ext
cropToBbox = async (): Promise<ImageDTO> => {
const { rect } = this.manager.stateApi.getBbox();
const rasterizeResult = await withResultAsync(() =>
this.renderer.rasterize({ rect, replaceObjects: true, attrs: { opacity: 1, filters: [] } })
this.renderer.rasterize({ rect, replaceObjects: true, attrs: { opacity: 1 } })
);
if (rasterizeResult.isErr()) {
toast({ status: 'error', title: 'Failed to crop to bbox' });

View File

@@ -72,7 +72,7 @@ export class CanvasEntityAdapterControlLayer extends CanvasEntityAdapterBase<
this.log.trace({ rect }, 'Getting canvas');
// The opacity may have been changed in response to user selecting a different entity category, so we must restore
// the original opacity before rendering the canvas
const attrs: GroupConfig = { opacity: this.state.opacity, filters: [] };
const attrs: GroupConfig = { opacity: this.state.opacity };
const canvas = this.renderer.getCanvas({ rect, attrs });
return canvas;
};

View File

@@ -71,7 +71,7 @@ export class CanvasEntityAdapterRasterLayer extends CanvasEntityAdapterBase<
this.log.trace({ rect }, 'Getting canvas');
// The opacity may have been changed in response to user selecting a different entity category, so we must restore
// the original opacity before rendering the canvas
const attrs: GroupConfig = { opacity: this.state.opacity, filters: [] };
const attrs: GroupConfig = { opacity: this.state.opacity };
const canvas = this.renderer.getCanvas({ rect, attrs });
return canvas;
};