In function csPen:: DrawArc in file pen.cpp (cstool lib) floats and integers are mixed. If you do an integer division like
void csPen:: DrawArc(uint x1, uint x2, ... )
{
float width = x2-x1;
float x_radius = width/2;
...
}
then, since the 2 is an integer (2.0 is a float), this division will be translated by the compiler to
float x_radius = (float)( (int)width/2 );
The consequence is that a width of 3 for instance will not evaluate to the float 1.5, but to 1.0 (integer division allways rounds down).
I am not sure what is intended here, but I think either this should be rewritten as:
float width = x2-x1;
float x_radius = width/2.0; // evaluates to 1.5
or when intended as:
int width = x2-x1;
int radius = width/2 // which evaluates to 1
both width and radius can in this case be uints even, I think, because if I am correct x2 should allways be greater than x1. (maybe that should be tested beforehand)