add scaleRatio
This commit is contained in:
parent
0a9eb3a5b0
commit
a30357a079
@ -43,6 +43,11 @@ Component({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// 缩放比,会在传入的 palette 中统一乘以该缩放比
|
||||||
|
scaleRatio: {
|
||||||
|
type: Number,
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
widthPixels: {
|
widthPixels: {
|
||||||
type: Number,
|
type: Number,
|
||||||
value: 0
|
value: 0
|
||||||
@ -545,7 +550,7 @@ Component({
|
|||||||
if (getApp() && getApp().systemInfo && getApp().systemInfo.screenWidth) {
|
if (getApp() && getApp().systemInfo && getApp().systemInfo.screenWidth) {
|
||||||
this.screenK = getApp().systemInfo.screenWidth / 750;
|
this.screenK = getApp().systemInfo.screenWidth / 750;
|
||||||
}
|
}
|
||||||
setStringPrototype(this.screenK, 1);
|
setStringPrototype(this.screenK, this.properties.scaleRatio);
|
||||||
},
|
},
|
||||||
|
|
||||||
initDancePalette() {
|
initDancePalette() {
|
||||||
@ -618,7 +623,7 @@ Component({
|
|||||||
new Pen(this.photoContext, palette).paint(() => {
|
new Pen(this.photoContext, palette).paint(() => {
|
||||||
this.saveImgToLocal();
|
this.saveImgToLocal();
|
||||||
});
|
});
|
||||||
setStringPrototype(this.screenK, 1);
|
setStringPrototype(this.screenK, this.properties.scaleRatio);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user