#14732 closed defect (fixed)

Landscape is not working on Ubuntu platform

Reported by: agrawal.raj Owned by:
Priority: normal Milestone:
Component: printing Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: yes

Description

I am using printing sample( wxWidgets/Sample/Printing ). I am setting Landscape print orientation. After this whenever I try for printing ,It gives wrong results.
I am using Platform: Ubuntu10.10

Kindly help me to solve this. I have posted one more issue " #14726: Issue in drag and drop text", but sorry to say I have not received any response from your side.


Attachments (2)

tweaked-printing-sample.diff download (1.2 KB) - added by wojdyr 23 months ago.
printing sample: add ctrl-P shortcut (useful when testing again and again) and green border on page 2, to verify page size
wxgtk-landscape-fix.diff download (2.0 KB) - added by wojdyr 23 months ago.
patch

Download all attachments as: .zip

Change History (9)

comment:1 follow-up: Changed 23 months ago by vadz

  • Priority changed from high to normal
  • Status changed from new to infoneeded_new

Could you please explain what do you mean by "wrong results" precisely?

Concerning the other ticket, we can't fix all bugs that are reported and definitely not immediately. We do what we can and any help is welcome.

Please also read about (not) setting bug priorities in HowToSubmitBugs.

comment:2 in reply to: ↑ 1 Changed 23 months ago by agrawal.raj

  • Status changed from infoneeded_new to new

Replying to vadz:

Could you please explain what do you mean by "wrong results" precisely?

Concerning the other ticket, we can't fix all bugs that are reported and definitely not immediately. We do what we can and any help is welcome.

Please also read about (not) setting bug priorities in HowToSubmitBugs.

All text moves to top of the page. Text are truncated. Margin is setting wrongly.

comment:3 Changed 23 months ago by wojdyr

  • Status changed from new to confirmed

accidentally I was trying to fix it yesterday, but I haven't managed to.
Page setup dialog, as in printing sample, has 4 options: portrait, landscape, reverse p. and reverse l.
In 3 cases other than portrait it seems that the origin of the page is set incorrectly (direction and scale look correct). I don't know where it should be fixed, in wx Logical/DeviceOrigin, or in cairo user-to-device translation.
It may be trivial to fix for someone who understands this code.

comment:4 Changed 23 months ago by vadz

Unfortunately it's non-trivial to find somebody understanding this code...

I definitely don't qualify but I'd start by checking what do gtk_page_setup_get_left_margin() and gtk_page_setup_get_top_margin() return in wxGtkPrinterDCImpl ctor -- perhaps it's not something that we expect?

comment:5 Changed 23 months ago by wojdyr

I've just fixed it, I'm testing it now.

Changed 23 months ago by wojdyr

printing sample: add ctrl-P shortcut (useful when testing again and again) and green border on page 2, to verify page size

comment:6 Changed 23 months ago by wojdyr

  • Patch set

The reason is that changes to cairo transformation matrix affect later changes to this matrix.
In this case cairo_scale() called in wxGtkPrinterDCImpl ctor scaled translations from _gtk_print_context_rotate_according_to_orientation().

After moving cairo_scale() and cairo_translate() from ctor to StartPage(), which is called after _gtk_print_context_rotate_according_to_orientation(), origin of the page is good in all orientations.

Changed 23 months ago by wojdyr

patch

comment:7 Changed 23 months ago by vadz

  • Resolution set to fixed
  • Status changed from confirmed to closed

Thanks a lot for debugging and fixing this!

Applied in r72646 but for some reason the bug wasn't closed automatically.

Note: See TracTickets for help on using tickets.