Code example for Paint

Methods: getAlpha

0
		if (mFillPath.isEmpty()) {
			return PixelFormat.OPAQUE;
		} 
		 
		final int stroke = mStrokePaint.getAlpha();
		final int fill = mFillPaint.getAlpha();
		final int text = mTextPaint.getAlpha();
		 
		if ((mStrokePath.isEmpty() || stroke == 0) && fill == 0 && (mText == null || text == 0)) {
			return PixelFormat.TRANSPARENT;
		} else if ((mStrokePath.isEmpty() || stroke == 255) && fill == 255
				&& (mText == null || text == 255)) {
			return PixelFormat.OPAQUE;
		} else { 
			return PixelFormat.TRANSLUCENT;
		} 
	} 
	 
	/** 
	 * No color filter. 
	 */