mirror printing broken

Bug #1463406 reported by Andrey Olkhin on 2015-06-09
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Low
Unassigned

Bug Description

Preview empty and prints nothing except frame ref when "mirror" checked.
As workaround i'm using export svg file, but it has no pad drill options.

Application: kicad
Version: (after 2015-may-25 BZR unknown)-product release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.9.2,wx containers,compatible with 2.8)
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Nick Østergaard (nickoe) wrote :

A better workaround is to use the plot dialog.

Chris Pavlina (pavlina-chris) wrote :

I can't confirm this on a Linux build.

tags: added: pcbnew print
tags: added: windows
Changed in kicad:
importance: Undecided → Low
tags: added: printing
removed: print
Chris Pavlina (pavlina-chris) wrote :

Confirmed in 5720 on Windows 7 (latest nickoe build).

Changed in kicad:
status: New → Confirmed
Wayne Stambaugh (stambaughw) wrote :

This is a known issue in wxWidgets 3.0.2 that didn't exist in 3.0.1. Of course there are other known bugs in 3.0.1 so you get pick which bugs you find the most irritating and use the appropriate version of wxWidgets. I've also check out the trunk of wxWidgets and the problem still exists. I looked at the wxWidgets changes between 3.0.1 and 3.0.2 and I didn't see anything in the wxPrintDC code that would cause this issue. I keep a 3.0.1 version of wxWidgets just for this purpose. Maybe some day I'll get motivated enough to figure out what changed so I can fix it. It's definitely specific to windows because on Linux the problem doesn't exist.

No so simple.
It works fine for me, on W7 32 bits.

Perhaps specific of 64 bit build.

The best way as workaround is to use plot postscript, which was actually designed to create accurate documents.

Just checked and both 32 and 64 bit builds using wxWidgets 3.0.2 and
mirrored printing is broken on 64 bit W7 professional. Are you using a
32 bit version of W7? I have a 32 bit build using 3.0.1 and mirrored
printing is correct. I cloned wxWidgets (now on github which is very
nice) and ran a diff between 3.0.1 and 3.0.2 and there are a bunch of
clip rectangle changes to wxDCBase and some minor changes to the msw
implementation of wxDC. I'm guessing this is where things got broken.
It's possible that the wxDC clip rectangle is not getting updated when
the X axis coordinates are inverted by the print mirroring and the
drawing is being clipped internally by wxDC. I will attempt to clear
the wxDC clip region before the printing to see if that makes any
difference. Beyond that, I'll have to fire up the debugger to try to
figure out what is going on.

On 6/9/2015 1:58 PM, jean-pierre charras wrote:
> No so simple.
> It works fine for me, on W7 32 bits.
>
> Perhaps specific of 64 bit build.
>
> The best way as workaround is to use plot postscript, which was actually
> designed to create accurate documents.
>

Yes, I am using wxWidgets 3.0.2 and W7 professional 32 bits.

Clipping issue could be a good explanation.

Wayne Stambaugh (stambaughw) wrote :

It was a bug in wxWidgets 3.0.2. See
http://trac.wxwidgets.org/ticket/16908. The patch included in the bug
report does not apply cleanly so I had to modify the src/msw/dc.cpp file
by hand. I rebuilt and installed 3.0.2 and that solved the mirrored
printing issue. I will create a patch for third party builds and update
the msys2 project PKGBUILD file so it can be fixed there as well. If
you clone the wx repo, the patch is already applied. I'm guessing it
will be fixed in the next release of wxWidgets.

On 6/10/2015 2:23 AM, jean-pierre charras wrote:
> Yes, I am using wxWidgets 3.0.2 and W7 professional 32 bits.
>
> Clipping issue could be a good explanation.
>

Changed in kicad:
status: Confirmed → Won't Fix
Wayne Stambaugh (stambaughw) wrote :

This is bug in the msw version of wxWidgets 3.0.2 which cannot be fixed by code changes in KiCad. You will have to modify wxWidgets 3.0.2 in order to resolve the issue. See my reply to JP on the fix.

Wayne Stambaugh (stambaughw) wrote :

I've committed a patch the product branch r5746 that fixes the mirrored printing problem on Windows. I've also sent this patch the MSYS2 project so the fix will be available as soon as the wxWidgets packages 3.0.2-9 are released. Packagers please note that you will have to manually apply this patch to the wxWidgets 3.0.2 source to and rebuild you wxWidgets libraries. This bug does not effect linux or osx.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.