mirror of
https://gitee.com/openharmony-tpc/ImageKnife.git
synced 2026-07-15 06:04:31 +08:00
1.fix lint error,cannot use width & height as properties.
Signed-off-by: dodozhou7 <abczp777777@163.com>
This commit is contained in:
@@ -29,8 +29,8 @@ export struct CropImagePage2 {
|
||||
@State options1: PixelMapCrop.Options = new PixelMapCrop.Options();
|
||||
@State cropTap: boolean = false;
|
||||
@State pack: PixelMapPack = new PixelMapPack();
|
||||
@State width: number = 0;
|
||||
@State height: number = 0;
|
||||
@State width1: number = 0;
|
||||
@State height1: number = 0;
|
||||
@State _rotate: number = 0;
|
||||
@State _scale: number = 1;
|
||||
private _resource: Resource = $r('app.media.bmpNet');
|
||||
@@ -54,8 +54,8 @@ export struct CropImagePage2 {
|
||||
let pack1 = new PixelMapPack();
|
||||
pack1.pixelMap = pixelmap;
|
||||
this.pack = pack1;
|
||||
this.width = sx * px2vp(1);
|
||||
this.height = sy * px2vp(1);
|
||||
this.width1 = sx * px2vp(1);
|
||||
this.height1 = sy * px2vp(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,13 +77,13 @@ export struct CropImagePage2 {
|
||||
|
||||
|
||||
Image(this.pack.pixelMap)
|
||||
.width(this.width)
|
||||
.height(this.height)
|
||||
.width(this.width1)
|
||||
.height(this.height1)
|
||||
.objectFit(ImageFit.Contain)
|
||||
.rotate({
|
||||
z: 1,
|
||||
centerX: this.width / 2,
|
||||
centerY: this.height / 2,
|
||||
centerX: this.width1 / 2,
|
||||
centerY: this.height1 / 2,
|
||||
angle: this._rotate
|
||||
})
|
||||
.scale({ x: this._scale, y: this._scale, z: 1.0 })
|
||||
|
||||
Reference in New Issue
Block a user