Code example for Paint

Methods: setAntiAlias, setColor, setStrokeCap, setStrokeJoin, setStrokeWidth, setStyle

0
     
	public void setupView(int _penColor, float _penWidth, int _bgColor) {
		penColor = _penColor;
		penWidth = _penWidth;
		bgColor = _bgColor;
        mPaint = new Paint();
        mPaint.setAntiAlias(true);
        mPaint.setColor(Color.argb(	(penColor & 0xFF000000) >> 24,
					        		(penColor & 0xFF0000) >> 16,
					        		(penColor & 0xFF00) >> 8,
					        		penColor & 0xFF));
        mPaint.setStyle(Paint.Style.STROKE);
        mPaint.setStrokeJoin(Paint.Join.ROUND);
        mPaint.setStrokeCap(Paint.Cap.ROUND);
        mPaint.setStrokeWidth(penWidth);
         
        Signature.reportMsg("$$$   setupView()"); 
        Signature.reportMsg("$$$        penColor = "+String.valueOf(penColor));
        Signature.reportMsg("$$$        bgColor = "+String.valueOf(bgColor));
         
    	setDrawingCacheEnabled(false);