SVGFileDC DrawEllipticArc is buggy

DrawEllipticArc is wrong with SVGFileDC:

  • Lines are drawn to arc ends.

From https://wxpython.org/Phoenix/docs/html/wx.DC.html#wx.DC.DrawEllipticArc :

“Notice that unlike DrawArc , this function does not draw the lines to the arc ends, even when using non-transparent brush.”

  • Incorrect drawing with and without fill depends on start/end angle.

  • End point is 1 pixel too far.

Observe the SVG output, where some horizontal and vertical black lines are overlapped by the ellipses, while in the on screen drawing they are not.

Enclosed program draws to an SVG file (svg_ellipticarc.svg) and on screen.

svg_ellipticarc.py (3.37 KB)

svg_ellipticarc.svg

screen_elliptiarc.png

This and your other SVGFileDC issues are wxWidgets problems, not wxPython-specific. Please create tickets for them, if they are not already there at https://trac.wxwidgets.org/

···

Robin

On Tuesday, March 19, 2019 at 5:00:58 PM UTC-7, ABC wrote:

DrawEllipticArc is wrong with SVGFileDC:

  • Lines are drawn to arc ends.

From https://wxpython.org/Phoenix/docs/html/wx.DC.html#wx.DC.DrawEllipticArc :

“Notice that unlike DrawArc , this function does not draw the lines to the arc ends, even when using non-transparent brush.”

  • Incorrect drawing with and without fill depends on start/end angle.
  • End point is 1 pixel too far.

Observe the SVG output, where some horizontal and vertical black lines are overlapped by the ellipses, while in the on screen drawing they are not.

Enclosed program draws to an SVG file (svg_ellipticarc.svg) and on screen.

Thanks Robin. I checked. In 2016, SVGFileDC was thoroughly fixed in wx.Widgets (drawing lines, arcs, text, the whole thing…).

The version of wxPython that I’m using reports itself with wx.version() to be

“4.0.3 msw (phoenix) wxWidgets 3.0.5”.

Can someone confirm whether they also see these issues with their wxPython 4?

It looks like those changes were not backported to the WX_3_0_BRANCH, so they are not included in wxPython 4.0.x. wxPython 4.1 (in progress now) will be using wxWidgets’ 3.1.x series and so those changes will be included then.

···

On Wednesday, March 20, 2019 at 8:34:46 AM UTC-7, ABC wrote:

Thanks Robin. I checked. In 2016, SVGFileDC was thoroughly fixed in wx.Widgets (drawing lines, arcs, text, the whole thing…).

The version of wxPython that I’m using reports itself with wx.version() to be

“4.0.3 msw (phoenix) wxWidgets 3.0.5”.

Robin

Alternatively, you could also request that they be backported to wxWidgets 3.0.x, assuming Robin ever plans another 4.0.x release.

Scott

···

On Wed, 20 Mar 2019, Robin Dunn wrote:

On Wednesday, March 20, 2019 at 8:34:46 AM UTC-7, ABC wrote:
      Thanks Robin. I checked. In 2016, SVGFileDC was thoroughly fixed
      in wx.Widgets (drawing lines, arcs, text, the whole thing...).
The version of wxPython that I'm using reports itself with
wx.version() to be
"4.0.3 msw (phoenix) wxWidgets 3.0.5".

It looks like those changes were not backported to the WX_3_0_BRANCH, so
they are not included in wxPython 4.0.x. wxPython 4.1 (in progress now) will
be using wxWidgets' 3.1.x series and so those changes will be included then.

Thanks for confirming these issues!
Robin, do you plan on another 4.0.x, or will 4.1 be the next one - and
roughly when?

···

On Wed, Mar 20, 2019 at 10:25 AM Scott Talbert <swt@techie.net> wrote:

On Wed, 20 Mar 2019, Robin Dunn wrote:

> On Wednesday, March 20, 2019 at 8:34:46 AM UTC-7, ABC wrote:
> Thanks Robin. I checked. In 2016, SVGFileDC was thoroughly fixed
> in wx.Widgets (drawing lines, arcs, text, the whole thing...).
> The version of wxPython that I'm using reports itself with
> wx.version() to be
> "4.0.3 msw (phoenix) wxWidgets 3.0.5".
>
>
> It looks like those changes were not backported to the WX_3_0_BRANCH, so
> they are not included in wxPython 4.0.x. wxPython 4.1 (in progress now) will
> be using wxWidgets' 3.1.x series and so those changes will be included then.

Alternatively, you could also request that they be backported to wxWidgets
3.0.x, assuming Robin ever plans another 4.0.x release.

Scott

--
You received this message because you are subscribed to a topic in the Google Groups "wxPython-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxPython-dev/PVjF65BTLTM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxPython-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

There have been a few fixes in the 4.0 branch, so there probably will be a 4.0.5. I’ve been busy with several other things lately and haven’t had a lot of time for working on the project, so the timeline for either release is unknown at the moment.

···

On Wednesday, March 20, 2019 at 10:55:16 AM UTC-7, ABC wrote:

Thanks for confirming these issues!

Robin, do you plan on another 4.0.x, or will 4.1 be the next one - and

roughly when?

Robin

Robin, I understand the constraints on your time, and I appreciate your support for wxPython.

Is there any way to bring wxWidget’s fixes to SVG into the 4.0.5 release?

You will need to submit a TRAC ticket[1] to request them to be backported, or write to one of the wxWidgets mailing lists.

[1] https://trac.wxwidgets.org/

Scott

···

On Thu, 21 Mar 2019, ABC wrote:

Robin, I understand the constraints on your time, and I appreciate your
support for wxPython.
Is there any way to bring wxWidget's fixes to SVG into the 4.0.5 release?

I updated my wxPython to 4.0.4, and get this version message:

4.0.4 msw (phoenix) wxWidgets 3.0.5

The latest wxWidgets version in the 3.0 branch, that I can find, is 3.0.4, and not 3.0.5.

A major wxWidgets update to SVG was done with the following submission:

https://github.com/wxWidgets/wxWidgets/pull/215, seems like into version 3.1.1 .

Do I need to ask for back-port from 3.1.1 into 3.0.4?

There are two main branches of wxWidgets:
3.0.x (git branch = WX_3_0_BRANCH) - this is the "stable" release branch.
3.1.x (git branch = master) - this is the "development" release branch.

The latest release of the 3.0.x branch is 3.0.4, but wxPython pulls in directly from the WX_3_0_BRANCH and not from 3.0.x releases. That's why wxPython reports 3.0.5, since it is pulling from the head of the WX_3_0_BRANCH.

You need to request the updates be backported from master to WX_3_0_BRANCH. Note that it may not be possible to backport those changes if they involved ABI changes.

Scott

···

On Fri, 22 Mar 2019, ABC wrote:

I updated my wxPython to 4.0.4, and get this version message:
4.0.4 msw (phoenix) wxWidgets 3.0.5

The latest wxWidgets version in the 3.0 branch, that I can find, is 3.0.4,
and not 3.0.5.
A major wxWidgets update to SVG was done with the following submission:
https://github.com/wxWidgets/wxWidgets/pull/215, seems like into version
3.1.1 .

Do I need to ask for back-port from 3.1.1 into 3.0.4?

The maintainer of the SVG functionality back-ported his bug fixes to wxWidgets:WX_3_0_BRANCH .

See: https://github.com/wxWidgets/wxWidgets/pull/1275

I hope these will be picked up by wxPython’s next release.

Thanks for your advice.

Release 4.0.6 seems to have resolved these issues.