Skip to content

Commit

Permalink
Merge pull request #34 from tidev/fixWhite
Browse files Browse the repository at this point in the history
fix(android): allow white
  • Loading branch information
caspahouzer authored Jul 21, 2022
2 parents 1292207 + 79cdf76 commit efe21d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 5.0.0
version: 5.0.1
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: Provides a paint surface user interface view.
Expand Down
6 changes: 3 additions & 3 deletions android/src/ti/modules/titanium/paint/UIPaintView.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class UIPaintView extends TiUIView {
public PaintView tiPaintView;
private KrollDict props;
private Boolean eraseState = false;
private int currentColor = -1;
private int currentColor = -999999999;
private int alphaState = -1;
private Float oldWidth = -1.0f;

Expand All @@ -47,7 +47,7 @@ public UIPaintView(TiViewProxy proxy) {
}

private void setPaintOptions() {
if (currentColor == -1) {
if (currentColor == -999999999) {
currentColor = (props.containsKeyAndNotNull("strokeColor")) ? TiConvert.toColor(props, "strokeColor") : TiConvert.toColor("black");
}

Expand Down Expand Up @@ -83,7 +83,7 @@ public void setEraseMode(Boolean toggle) {
eraseState = toggle;
if (eraseState) {
tiPaint.setColor(TiConvert.toColor("black"));
tiPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
tiPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
} else {
tiPaint.setXfermode(null);
}
Expand Down

0 comments on commit efe21d2

Please sign in to comment.