~ubuntu-branches/ubuntu/wily/padre/wily

« back to all changes in this revision

Viewing changes to lib/Padre/Wx/Printout.pm

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2009-08-12 14:44:55 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090812144455-yvk90oa92khfcnls
Tags: 0.42-1
* New Upstream Version
  + add explicit dependency on libtest-simple-perl (>= 0.88)
  + rules: use dh --with quilt (and bump quilt build-dependency to 0.46-7)
  + rules: no need to re-generate .mo files from .po. Upstream does it now
  + copyright: describe share/icons/padre/16x16/logo.png
    - describe share/icons/padre/16x16/toggle-comments.png
    - Padre license is the same as Perl (i.e. not Perl 5)
    - update list of copright holders
    - also list translators
  + drop libtest-most-perl from build-dependencies
  + add liblocale-msgfmt-perl to build-dependencies
  + add libcapture-tiny-perl to (build-)dependencies
  + add libfile-remove-perl (>= 1.42) to (build-)dependencies
  + drop libmodule-inspector-perl from (build-)dependencies
  + add libppix-editortools-perl to (build-)dependencies
  + add libparse-exuberantctags-perl to (build-)dependencies
  + patches:
    - drop lower-wx-requirement-to-2.8.7.patch and replace it with
      SKIP_WXWIDGETS_VERSION_CHECK=1 when configuring
      adjust README.debian accordingly
    - refresh disable-tcp-server.patch
    - drop don't-require-new-file-path.patch (applied upstream)
    - rework fix-pod2-errors.patch (new release, new errors :))
* add fix-perl-interpreter-path.patch fixing the path to the perl interpreter
  in three examples (thanks lintian)
* add more lintian overrides about script-not-executable for scripts that are
  treated as examples/templates
* add fix-whatis.patch fixing the whatis entry of Padre::Wx
* add menu and .desktop file

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
use Wx::Print;
6
6
use base qw(Wx::Printout);
7
7
 
8
 
our $VERSION = '0.36';
 
8
our $VERSION = '0.42';
9
9
 
10
10
sub new {
11
11
        my $class  = shift;
31
31
        if ( $page == 1 ) {
32
32
                $self->{PRINTED} = 0;
33
33
        }
34
 
        $self->{PRINTED}
35
 
                = $e->FormatRange( 1, $self->{PRINTED}, $e->GetLength, $dc, $dc, $self->{printRect}, $self->{pageRect} );
 
34
        $self->{PRINTED} =
 
35
                $e->FormatRange( 1, $self->{PRINTED}, $e->GetLength, $dc, $dc, $self->{printRect}, $self->{pageRect} );
36
36
 
37
37
        return 1;
38
38
}
58
58
        $self->{pageRect} = Wx::Rect->new( 0, 0, $pageSize->GetWidth, $pageSize->GetHeight );
59
59
 
60
60
        # my $topLeft  = $psdd->GetMarginTopLeft;
61
 
        my $left = 25.4;    # $topLeft->x;
62
 
        my $top  = 25.4;    # $topLeft->y;
 
61
        my $left = 25.4; # $topLeft->x;
 
62
        my $top  = 25.4; # $topLeft->y;
63
63
 
64
64
        # my $btmRight = $psdd->GetMarginBottomRight;
65
 
        my $right  = Wx::Size->new( $self->GetPageSizeMM )->GetWidth - 50.8;    # $btmRight->x;
66
 
        my $bottom = 25.4;                                                      # $btmRight->y;
 
65
        my $right  = Wx::Size->new( $self->GetPageSizeMM )->GetWidth - 50.8; # $btmRight->x;
 
66
        my $bottom = 25.4;                                                   # $btmRight->y;
67
67
 
68
68
        $top    = int( $top * $ppiScr->GetHeight / 25.4 );
69
69
        $bottom = int( $bottom * $ppiScr->GetHeight / 25.4 );
116
116
        my ( $sx, $sy ) = $self->GetPPIScreen;
117
117
 
118
118
        my $ppiScr = Wx::Size->new( $sx, $sy );
119
 
        if ( $ppiScr->GetWidth == 0 ) {    # guessing 96 dpi
 
119
        if ( $ppiScr->GetWidth == 0 ) { # guessing 96 dpi
120
120
                $ppiScr->SetWidth(96);
121
121
                $ppiScr->SetHeight(96);
122
122
        }
124
124
        my ( $px, $py ) = $self->GetPPIPrinter;
125
125
        my $ppiPrt = Wx::Size->new( $px, $py );
126
126
 
127
 
        if ( $ppiPrt->GetWidth == 0 ) {    # scaling factor 1
 
127
        if ( $ppiPrt->GetWidth == 0 ) { # scaling factor 1
128
128
                $ppiPrt->SetWidth( $ppiScr->GetWidth );
129
129
                $ppiPrt->SetHeight( $ppiScr->GetHeight );
130
130
        }