canvas-editor-engine 1.0.42 → 1.0.44
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,8 @@
|
|
1
1
|
import type { IDrawImageArgs, IFilterOptions, IImageOptions } from "../types/image";
|
2
2
|
export default class DrawService {
|
3
|
+
static scImage: SCImage;
|
3
4
|
static drawImage(ctx: CanvasRenderingContext2D, src: string, options: IDrawImageArgs): void;
|
4
|
-
static drawSmoothImage(useStore: boolean,
|
5
|
+
static drawSmoothImage(useStore: boolean, options: IDrawImageArgs, filterOptions: IFilterOptions): void;
|
5
6
|
private static getFilterArgs;
|
6
7
|
}
|
7
8
|
export declare class SCImage {
|
@@ -5,14 +5,14 @@ const config_1 = require("../config");
|
|
5
5
|
const filters_1 = require("../filters");
|
6
6
|
const store_1 = require("../store/store");
|
7
7
|
class DrawService {
|
8
|
+
static scImage;
|
8
9
|
static drawImage(ctx, src, options) {
|
9
|
-
|
10
|
-
|
10
|
+
DrawService.scImage = new SCImage(src, ctx);
|
11
|
+
DrawService.scImage.draw(options);
|
11
12
|
}
|
12
|
-
static drawSmoothImage(useStore,
|
13
|
-
const img = new SCImage(src, ctx);
|
13
|
+
static drawSmoothImage(useStore, options, filterOptions) {
|
14
14
|
const filterArgs = DrawService.getFilterArgs(useStore, options);
|
15
|
-
|
15
|
+
this.scImage.vague(filterArgs, filterOptions);
|
16
16
|
}
|
17
17
|
static getFilterArgs(useStore, options) {
|
18
18
|
let filterArgs;
|