I am drawing lines using GfxLineTo. Depending on the max and min price within a pane, I set line width using GfxSelectPen to draws lines of width more than 1 pixel. But lines of width more than 1 pixel show rounded ends which overshoot the first as well as last 'x' co-ordinate. I would like to draw lines with sharp ends just like a rectangle. Is there any parameter which makes it possible?
Example of my code:
GfxSelectPen(color, lineWidth); // Linewidth can be 3 or even 5 in some cases.
GfxMoveTo(x1, y);
GfxLineTo(x2, y);
So the ends of fat lines are ended with circle with circle center at the beginning and end of the line (round end cap). This is the "overshoot". It works as if you drawn the line with fat marker pen manually on piece of paper. Fat marker makes fat line and fat ends. This is done to make sure that lines with multiple segments have smooth joints.
Other end caps are not supported at the moment but it can be added if lots of people need that.