7 package com.google.appinventor.components.runtime.util;
9 import android.graphics.Paint;
10 import android.graphics.PorterDuffXfermode;
30 paint.setColor(argb & 0x00FFFFFF);
31 paint.setAlpha((argb >> 24) & 0xFF);
32 paint.setXfermode(
null);
42 paint.setXfermode(
new PorterDuffXfermode(android.graphics.PorterDuff.Mode.CLEAR));
46 String unprefixed = argb;
47 if (argb.startsWith(
"#x") || argb.startsWith(
"&H")) {
48 unprefixed = argb.substring(2);
51 long l = Long.parseLong(unprefixed, 16);
52 if (l > Integer.MAX_VALUE) {
53 l += 2 * Integer.MIN_VALUE;