I am creating Paths and adding multi lines in each path by using path.moveTo(x, y)
and path.lineTo(x, y)
. Then canvas.drawPath(path, paint)
is drawing all paths. But there are 1-2 pixel space between lines in some paths. How can I remove these spaces? My code is something like that:
paint = new Paint();
paint.setColor(Color.RED);
paint.setStyle(Paint.Style.FILL_AND_STROKE);
paint.setDither(false);
paint.setStrokeWidth(3);
paint.setAntiAlias(true);
for (int i = 0; i < length; i++) {
Path path = new Path();
path.moveTo(a, b);
path.lineTo(c, d);
path.moveTo(c, d);
path.lineTo(e, f);
canvas.drawPath(path, paint);
}