fix(qimage): fix setPixelColor (#810)

This commit is contained in:
4h7l 2021-02-26 02:44:22 +05:00 committed by GitHub
parent c85120054e
commit 006d35914a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -388,10 +388,10 @@ export class QImage extends Component {
setPixelColor(x: number, y: number, color: QColor): void;
setPixelColor(positionOrX: QPoint | number, colorOrY: QColor | number, color?: QColor): void {
if (positionOrX instanceof QPoint) {
this.native.setPixel(positionOrX.native, colorOrY);
this.native.setPixelColor(positionOrX.native, colorOrY);
return;
}
this.native.setPixel(positionOrX, colorOrY, color?.native as NativeElement);
this.native.setPixelColor(positionOrX, colorOrY, color?.native as NativeElement);
}
/** Sets the image text to the given text and associate it with the given key */