gbranden pushed a commit to branch master
in repository groff.

commit eb224815e1d76a8190850746dd47cd8b6adc6ee1
Author: Deri James <[email protected]>
AuthorDate: Sun Dec 10 20:05:43 2023 +0000

    [gropdf]: Fix arc drawing when `-l` option used.
    
    * src/devices/gropdf/gropdf.pl (PlotArcSegement): When landscape flag
      `-l` is given, coordinates for arcs need rotation.
---
 ChangeLog                    | 7 +++++++
 src/devices/gropdf/gropdf.pl | 9 ++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index b5c5ab890..143fbb665 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-12-10  Deri James  <[email protected]>
+
+       [gropdf]: Fix arc drawing when `-l` option used.
+
+       * src/devices/gropdf/gropdf.pl (PlotArcSegement): When landscape
+       flag `-l` is given, coordinates for arcs need rotation.
+
 2023-11-24  Deri James  <[email protected]>
 
        [gropdf]: Fix processing of catenated dit files (-Z).
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 8cbadc353..3ab602cca 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -3390,7 +3390,14 @@ sub PlotArcSegment
     my @mat=($cos,$sin,-$sin,$cos,0,0);
     my $lw=$lwidth/$r;
 
-    $stream.="q $r 0 0 $r $transx $transy cm ".join(' ',@mat)." cm $lw w $x0 
$y0 m $x1 $y1 $x2 $y2 $x3 $y3 c S Q\n";
+    if ($frot)
+    {
+       $stream.="q $r 0 0 $r $transy $transx cm ".join(' ',@mat)." cm $lw w 
$y0 $x0 m $y1 $x1 $y2 $x2 $y3 $x3 c S Q\n";
+    }
+    else
+    {
+       $stream.="q $r 0 0 $r $transx $transy cm ".join(' ',@mat)." cm $lw w 
$x0 $y0 m $x1 $y1 $x2 $y2 $x3 $y3 c S Q\n";
+    }
 }
 
 sub DrawCircle

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to