wxGDIPlusContext::StrokeLines() wrongly truncates floating point coordinates
|Reported by:||tibo_||Owned by:||VZ|
The GDI+ implementation of wxGraphicsContext uses its own fast-path implementation of StrokeLines() and DrawLines(). These call native functions directly rather than creating a wxGraphicsPath and calling StrokePath().
For some reason, the current implementation, taking its input as doubles, truncates them with a typecast to int, before storing them in the native Point type (which uses integer coordinates).
Given that GDI+ exposes the PointF type - similar to Point, but using floating point coordinates - and that there is no apparent reason for this - as all coordinates of wxGraphicsContext are assumed to be doubles - it seems natural to remove the cast-to-int.
The provided patch (against trunk) removes the cast, and replaces Point instances with PointF, using a cast to REAL (as it's the underlying floating point type) to make sure no warning is emitted by the compiler. GDI+ can't use doubles anyway.