Code example for Canvas

Methods: drawPoint

		return debugDrawPoint(canvas,name+" "+point.toString(),point.x, point.y, color, posX, posY);
	private float debugDrawPoint(Canvas canvas, String name, float X, float Y, int color, float posX, float posY) {
		drawTextShadowed(canvas,name,posX , posY, mTextPaint,mTextPaintShadow);
		Paint paint = new Paint();
		canvas.drawPoint(X, Y, paint);
		return posY+15;
	 * Draw a text with a nice shadow 
	public static void drawTextShadowed(Canvas canvas, String text, float x, float y, Paint textPain, Paint shadowPaint) {
    	canvas.drawText(text, x-1, y, shadowPaint);
    	canvas.drawText(text, x, y+1, shadowPaint);
    	canvas.drawText(text, x+1, y, shadowPaint);
Experience pair programming with AI  Get Codota for Java