WPainter.setWindow() causes WPainterPath to work incorrect for WPaintedWidget::PngImage
painter.setWindow() was applied to WPainter.
It was discovered, that in that case image parts, produced by WPainterPath (for example, lineTo), are rendered incorrectly if WPaintedWidget::PngImage is used. At the same time, methods of WPainter itself (for example, drawEllipse) work fine.
To demonstrate this bug, test case was created. It shows the same widget twice: with enforced PNG method and with standard method (non-PNG). Firstly, setWindow(0, 0, 1, 1) is called. Then a circle is drawn with a method of painter, and a line --- with a method of path. For non-PNG case (bottom), both are rendered in places, where expected. For PNG (above), the circle is painted in proper location, but the line seems to be shifted in the direction of top-left corner.
This bug was initially discovered by Ramil Mintaev (email@example.com).