kind of shooting in the dark here, but remember that the painter coordinate system can be scaled, rotated, and new origin set. Try explicitly defining the coordinate system...Also, if your coordinates are floating point then you have to deal with floating point roundoff error.