Using Android canvas draw commands:
If I set stroke = 0 or stroke =1 and draw horizontal line, the line pixels are two pixels high. If I set stroke = 2, the pixels are also two pixels high but are brighter.
If I draw single pixels, the pixels are a 2×2 matrix for stroke = 0 or stroke = 1. If the stroke = 2, I also get a 2×2 matrix but with brighter pixels.
What must I do to get lines that are only one pixel tall?
What must I do to get pixels that are one and only pixel?
Note: The devices that am using have screen sizes of 480 x 800 or greater.
Paint thePaint = new Paint();
thePaint.setARGB(a, r, g, b);
thePaint.setAntiAlias(true);
thePaint.setStyle(Paint.Style.FILL );
thePaint.setStrokeWidth(0);
canvas.drawLine(x1,y1,x2,y2, thePaint);
I communicated with The Roman Guy @Google about this issue. He said the AntiAlias need to be turned off in addition of setting stroke = 0. My testing showed that he is right. The Google documentation does not current reflect this requirement. This code works.