We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dc1392 commit 1c294a2Copy full SHA for 1c294a2
src/canvas.ios.ts
@@ -1042,9 +1042,16 @@ export class Paint implements IPaint {
1042
} else {
1043
this._color = undefined;
1044
}
1045
- }
1046
- setColor(color: Color | number | string) {
1047
- this.color = color as any;
+ if (this._color) {
+ // on android setColor sets the alpha too
+ const c = this._color;
1048
+ this.alpha = c.a;
1049
+ // we want to ignore color alpha because on android it is not used but
1050
+ // on ios it will add up
1051
+ this._color = new Color(255, c.r, c.g, c.b);
1052
+ } else {
1053
+ this.alpha = 255;
1054
+ }
1055
1056
1057
getColor(): Color {
0 commit comments