DrawEllipticArc shows lines to arc ends when drawing to wx.SVGFileDC

DrawEllipticArc works correctly when I draw towx.BufferedDC.
But, when I draw to wx.SVGFileDC, the lines connecting the end of an arc are shown too.
My drawing code is identical to both DCs, so that can’t be the reason.

I see in the SVG file
Picture generated by wxSVG v0100
Am I just using a very old wxSVG version?

More details…

I’m using:
Python 2.7.11
WxPython 3.0.2.0

Here’s what it looks like when drawing 2 90 degrees elliptical arcs through

  • wx.BufferedDC (png file), and
  • wx.SVGFileDC (svg file).

arc.png

arc.svg

The trick of wx is that it wraps the native toolkits – whch means there WILL be differences inhow things are drawn.

If you really need it to be identical, you may need to use some other libary to draw, and jsut dump tehimage to the srceen with wx.

Options are:

Agg – awsome anti-aliasing graphics lib – used by MAtplotlib amng others. I don’t know of a good stand alone wrapper, but you can access the drawing stuff from MPL, and there is an AggDRaw or somethig with PIL (PIllow)

Kiva:

http://code.enthought.com/projects/files/ETS3_API/enthought.kiva.html

uses Agg on teh back-end – not sure how easy it is to get it/use it outside the Enthought Tool Suite.

Cairo: drawing lib behind GTK – but I think it runs on all platfroms and can work with wx:

https://wxpython.org/docs/api/wx.lib.wxcairo-module.html

libgd: “Old fashioned” C lig for rendering – ued in PHP and lots of othe rolder projects. I wrote Pythonwrapper here:

https://github.com/NOAA-ORR-ERD/py_gd/blob/master/README.md

not full featured (only 8bit aliased drawing for now) but nice Pythonic interface. And written with Cython, so pretty easy to add features, if libgd itself has them.

-CHB

···

On Fri, Jun 24, 2016 at 4:46 PM, ABC nitzan.weinberg@gmail.com wrote:

More details…

I’m using:
Python 2.7.11
WxPython 3.0.2.0

Here’s what it looks like when drawing 2 90 degrees elliptical arcs through

  • wx.BufferedDC (png file), and
  • wx.SVGFileDC (svg file).

You received this message because you are subscribed to the Google Groups “wxPython-dev” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Thank you for your reply.

I believe this is a bug.
The function definition is that line to the arc end are not shown.

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.”

Thank you for your reply.

I believe this is a bug.
The function definition is that line to the arc end are not shown.

you are probably right -- the goal of wx is to provide the SAME API for
multiple back-ends, and this kind of thing is intended to be normalized. A
bug report to the wxWidgets bug tracking may be in order.

But it's also that case that things will slip through the cracks, and some
drawing systems support different features than others, so there will be
subtle differences.

-Chris

···

On Fri, Oct 21, 2016 at 9:05 AM, ABC <nitzan.weinberg@gmail.com> wrote:

From wx.DC — wxPython Phoenix 4.2.3a1 documentation.
DrawEllipticArc
"Notice that unlike DrawArc
<wx.DC — wxPython Phoenix 4.2.3a1 documentation; , this
function does not draw the lines to the arc ends, even when using
non-transparent brush."

--
You received this message because you are subscribed to the Google Groups
"wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxPython-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov