[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ChangeLog src/devices/gropdf/gropdf.pl
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ChangeLog src/devices/gropdf/gropdf.pl |
Date: |
Fri, 04 Jan 2013 07:28:43 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Werner LEMBERG <wl> 13/01/04 07:28:43
Modified files:
. : ChangeLog
src/devices/gropdf: gropdf.pl
Log message:
[gropdf] Various minor fixes.
* src/devices/gropdf/gropdf (do_x) <'X'> <'pdfpic'>: Using
\X'pdf: pdfpic'
with a zero width now works correctly.
(LoadPDF): Scale width in proportion to given height.
(do_s): In some circumstances a font size change is emitted before
current font is established. Fix handles this situation.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1369&r2=1.1370
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/gropdf/gropdf.pl?cvsroot=groff&r1=1.10&r2=1.11
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1369
retrieving revision 1.1370
diff -u -b -r1.1369 -r1.1370
--- ChangeLog 30 Dec 2012 08:47:20 -0000 1.1369
+++ ChangeLog 4 Jan 2013 07:28:40 -0000 1.1370
@@ -1,3 +1,18 @@
+2013-01-02 Deri James <address@hidden>
+
+ [gropdf] Various minor fixes.
+
+ * src/devices/gropdf/gropdf (do_x) <'X'> <'pdfpic'>: Using
+
+ \X'pdf: pdfpic'
+
+ with a zero width now works correctly.
+
+ (LoadPDF): Scale width in proportion to given height.
+
+ (do_s): In some circumstances a font size change is emitted before
+ current font is established. Fix handles this situation.
+
2012-12-30 Werner LEMBERG <address@hidden>
Version 1.22.1 released
Index: src/devices/gropdf/gropdf.pl
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/gropdf/gropdf.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- src/devices/gropdf/gropdf.pl 17 Oct 2012 10:45:33 -0000 1.10
+++ src/devices/gropdf/gropdf.pl 4 Jan 2013 07:28:42 -0000 1.11
@@ -892,8 +892,8 @@
elsif (lc($xprm[1]) eq 'pdfpic')
{
my $fil=$xprm[2];
- my $flag=uc($xprm[3]);
- my $wid=GetPoints($xprm[4]);
+ my $flag=uc($xprm[3])||'-L';
+ my $wid=GetPoints($xprm[4])||-1;
my $hgt=GetPoints($xprm[5]||-1);
my $ll=GetPoints($xprm[6]||0);
my $mat=[1,0,0,1,0,0];
@@ -907,6 +907,7 @@
{
IsGraphic();
my $bbox=$incfil{$fil}->[1];
+ $wid=($bbox->[2]-$bbox->[0]) if $wid <= 0;
my $xscale=$wid/($bbox->[2]-$bbox->[0]);
my $yscale=($hgt<=0)?$xscale:($hgt/($bbox->[3]-$bbox->[1]));
$xscale=($wid<=0)?$yscale:$xscale;
@@ -917,11 +918,11 @@
if ($flag eq '-C' and $ll > $wid)
{
- $xpos+=int(($ll-$wid)/2);
+ $xpos=int(($ll-$wid)/2);
}
elsif ($flag eq '-R' and $ll > $wid)
{
- $xpos+=$ll-$wid;
+ $xpos=$ll-$wid;
}
$ypos+=$hgt;
@@ -1270,10 +1271,10 @@
sub LoadPDF
{
my $pdfnm=shift;
+ my $mat=shift;
my $wid=shift;
my $hgt=shift;
my $type=shift;
- my $mat=[1,0,0,1,0,0];
my $pdf;
my $pdftxt='';
my $strmlen=0;
@@ -1411,8 +1412,9 @@
$BBox=[0,0,595,842] if !defined($BBox);
- my $xscale=$wid/($BBox->[2]-$BBox->[0]+1);
- my $yscale=($hgt<=0)?$xscale:($hgt/($BBox->[3]-$BBox->[1]+1));
+ $wid=($BBox->[2]-$BBox->[0]+1) if $wid==0;
+ my $xscale=abs($wid)/($BBox->[2]-$BBox->[0]+1);
+ my $yscale=($hgt<=0)?$xscale:(abs($hgt)/($BBox->[3]-$BBox->[1]+1));
$hgt=($BBox->[3]-$BBox->[1]+1)*$yscale;
if ($type eq "import")
@@ -2422,6 +2424,10 @@
$fontchg=1;
$widtbl=CacheWid($cft);
}
+ else
+ {
+ $cftsz=$par;
+ }
}
sub do_m
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ChangeLog src/devices/gropdf/gropdf.pl,
Werner LEMBERG <=