X-Git-Url: https://melusine.eu.org/syracuse/G/git/?a=blobdiff_plain;f=opt%2Fpsftopst.pl;h=ffc6a27e5496ea110aabc5b3662dc6d82800b321;hb=efdc067955e6eac4857853cb3170f0fb9d508e8d;hp=e127258a97ed64a1f1c883830e4fe976be7e44be;hpb=9eee0699194e5bdd4a8c0bf41e27b29bc3648559;p=pst-anamorphosis.git diff --git a/opt/psftopst.pl b/opt/psftopst.pl index e127258..ffc6a27 100755 --- a/opt/psftopst.pl +++ b/opt/psftopst.pl @@ -2,14 +2,14 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $ if 0; use strict; # ============================================================================== -# psftopdf +# psftopst # Version 1.0 (Mercredi 19 octobre 2011) Jean-Michel Sarlat # Ce script fait partie du projet pst-anamorphosis (Gilg, Luque, Sarlat) # http://melusine.eu.org/syracuse/G/pst-anamorphosis Checkout # http://melusine.eu.org/syracuse/G/git/?p=pst-anamorphosis.git git # ============================================================================== -our $windows_pstoedit = ""; +our $windows_pstoedit = ''; our $on_windows = $^O =~ /^MSWin/; our $GS = $on_windows ? "gswin32c" : "gs"; @@ -18,11 +18,11 @@ our $PS = $on_windows ? $windows_pstoedit : "pstoedit"; # === Acquisition des options de la ligne de commande ------------------------- $::opt_dimmax = 4; # Dimension maximale : 4 cm par défaut -$::opt_t = 0; # Transformation initiale par pstoedit +$::opt_ps = 0; # Transformation initiale par pstoedit use Getopt::Long; GetOptions( "dimmax=s", - "t" + "ps" ); our $debug = 1; @@ -37,7 +37,7 @@ our $Fichier = $ARGV[0]; our ($Nom, $Dir, $Ext) = &FichierNRE($Fichier); # === Transformation éventuelle par pstoedit ----------------------------------- -if ($::opt_t) { +if ($::opt_ps) { use File::Copy; my $f = "$Nom-original$Ext"; copy($Fichier, $f); @@ -108,7 +108,7 @@ sub EcritureFichierPST { my $l = ($$b[2] - $$b[0]); my $h = ($$b[3] - $$b[1]); my $max = $l; $max = $h if $h > $l; - $facteur = ($DimMax * $cm) / $max; + $facteur = $DimMax / $max; $out .= "%\@FACTEUR: $facteur\n"; my $abox = &xy_couple_modifie($b); $out .= "%\@PSPICTURE:\n";