Java tutorial
//package com.java2s; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PointF; public class Main { /** * Draw points in the Image * @param canvas * @param points array * @param width * @param height * @param frontCamera */ static public void drawPoints(Canvas canvas, Paint paint, PointF[] points, int width, int height, boolean frontCamera) { if (canvas == null) return; // paint.setStyle(Style.STROKE); for (PointF point : points) { PointF p = point; if (frontCamera) { p.x = width - p.x; } canvas.drawCircle(p.x, p.y, 2, paint); // canvas.drawPoint(p.x, p.y, paint); } } }