code: private void drawResultPoints(Bitmap barcode, float scaleFactor, Result rawResult) {
      ResultPoint[] points = rawResult.getResultPoints();
      if (points != null && points.length > 0) {
        Canvas canvas = new Canvas(barcode);
        Paint paint = new Paint();
        paint.setColor(getResources().getColor(R.color.result_points));
        if (points.length == 2) {
          paint.setStrokeWidth(4.0f);
          drawLine(canvas, paint, points[0], points[1], scaleFactor);
        } else if (points.length == 4 &&
                   (rawResult.getBarcodeFormat() == BarcodeFormat.UPC_A ||
                    rawResult.getBarcodeFormat() == BarcodeFormat.EAN_13)) {
          // Hacky special case -- draw two lines, for the barcode and metadata
          drawLine(canvas, paint, points[0], points[1], scaleFactor);
          drawLine(canvas, paint, points[2], points[3], scaleFactor);
        } else {
          paint.setStrokeWidth(10.0f);
          for (ResultPoint point : points) {
            if (point != null) {
              canvas.drawPoint(scaleFactor * point.getX(), scaleFactor * point.getY(), paint);
            }
          }
        }
      }
    }
docs: Superimpose a line for 1D or dots for 2D to highlight the key features of the barcode.
  
  @param barcode   A bitmap of the captured image.
  @param scaleFactor amount by which thumbnail was scaled
  @param rawResult The decoded results which contains the points to draw.