@leafer/image 1.12.4 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -7
- package/src/LeaferImage.ts +3 -3
- package/types/index.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/image",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "@leafer/image",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/task": "
|
|
26
|
-
"@leafer/file": "
|
|
27
|
-
"@leafer/data": "
|
|
28
|
-
"@leafer/math": "
|
|
29
|
-
"@leafer/platform": "
|
|
25
|
+
"@leafer/task": "2.0.1",
|
|
26
|
+
"@leafer/file": "2.0.1",
|
|
27
|
+
"@leafer/data": "2.0.1",
|
|
28
|
+
"@leafer/math": "2.0.1",
|
|
29
|
+
"@leafer/platform": "2.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@leafer/interface": "
|
|
32
|
+
"@leafer/interface": "2.0.1"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/LeaferImage.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeaferImage, ILeaferImageConfig, IFunction, IObject, InnerId, IMatrixData, ICanvasPattern, ILeaferImageCacheCanvas, ILeaferImagePatternPaint, ILeaferImageLevel, ISizeData, IImageCrossOrigin, IImageLOD } from '@leafer/interface'
|
|
1
|
+
import { ILeaferImage, ILeaferImageConfig, IFunction, IObject, InnerId, IMatrixData, ICanvasPattern, ILeaferImageCacheCanvas, ILeaferImagePatternPaint, ILeaferImageLevel, ISizeData, IImageCrossOrigin, IImageLOD, IInterlace } from '@leafer/interface'
|
|
2
2
|
import { Platform } from '@leafer/platform'
|
|
3
3
|
import { Resource } from '@leafer/file'
|
|
4
4
|
import { IncrementId } from '@leafer/math'
|
|
@@ -104,7 +104,7 @@ export class LeaferImage implements ILeaferImage {
|
|
|
104
104
|
return this.view
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
public getCanvas(width: number, height: number, opacity?: number, filters?: IObject, xGap?: number, yGap?: number, smooth?: boolean): any {
|
|
107
|
+
public getCanvas(width: number, height: number, opacity?: number, filters?: IObject, xGap?: number, yGap?: number, smooth?: boolean, interlace?: IInterlace): any {
|
|
108
108
|
width || (width = this.width)
|
|
109
109
|
height || (height = this.height)
|
|
110
110
|
|
|
@@ -114,7 +114,7 @@ export class LeaferImage implements ILeaferImage {
|
|
|
114
114
|
if (data) return data
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
const canvas = Platform.image.resize(this.view, width, height, xGap, yGap, undefined, smooth, opacity, filters)
|
|
117
|
+
const canvas = Platform.image.resize(this.view, width, height, xGap, yGap, undefined, smooth, opacity, filters, interlace)
|
|
118
118
|
|
|
119
119
|
this.cache = this.use > 1 ? { data: canvas, params: arguments } : null
|
|
120
120
|
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILeaferImage, InnerId, IImageLOD, IImageCrossOrigin, IObject, ILeaferImageConfig, IFunction, ILeaferImageCacheCanvas, ISizeData, IMatrixData, ILeaferImagePatternPaint, ICanvasPattern, ILeaferImageLevel, IImageManager } from '@leafer/interface';
|
|
1
|
+
import { ILeaferImage, InnerId, IImageLOD, IImageCrossOrigin, IObject, ILeaferImageConfig, IFunction, ILeaferImageCacheCanvas, ISizeData, IInterlace, IMatrixData, ILeaferImagePatternPaint, ICanvasPattern, ILeaferImageLevel, IImageManager } from '@leafer/interface';
|
|
2
2
|
|
|
3
3
|
declare class LeaferImage implements ILeaferImage {
|
|
4
4
|
readonly innerId: InnerId;
|
|
@@ -24,7 +24,7 @@ declare class LeaferImage implements ILeaferImage {
|
|
|
24
24
|
protected setView(img: any): void;
|
|
25
25
|
protected onComplete(isSuccess: boolean): void;
|
|
26
26
|
getFull(_filters?: IObject): any;
|
|
27
|
-
getCanvas(width: number, height: number, opacity?: number, filters?: IObject, xGap?: number, yGap?: number, smooth?: boolean): any;
|
|
27
|
+
getCanvas(width: number, height: number, opacity?: number, filters?: IObject, xGap?: number, yGap?: number, smooth?: boolean, interlace?: IInterlace): any;
|
|
28
28
|
getPattern(canvas: any, repeat: string | null, transform?: IMatrixData, paint?: ILeaferImagePatternPaint): ICanvasPattern;
|
|
29
29
|
getLoadUrl(_thumbSize?: ISizeData): string;
|
|
30
30
|
setThumbView(_view: number): void;
|