旋转手机,预览画面中物品高度变化明显,画面畸变。代码中的预览分辨率:previewProfile {"format":1003,"size":{"width":3200,"height":2400}},XComponent的surfaceWidth: 3200, surfaceHeight: 2400。
XComponent({
id: 'componentId',
type: 'surface',
controller: this.mXComponentController,
}).onLoad(async () => {
this.surfaceId = this.mXComponentController.getXComponentSurfaceId();
let baseContext = this.getUIContext().getHostContext()! as common.BaseContext;
await this.initCamera(baseContext, this.surfaceId)
}).width('100%')
.height('100%')