bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #63380] [gropdf] hyperlink doesn't work in landscape orientatio


From: Blake McBride
Subject: Re: [bug #63380] [gropdf] hyperlink doesn't work in landscape orientation
Date: Fri, 18 Nov 2022 06:13:43 -0600

Thanks!  Is this going into the GIT repo soon?

Blake


On Thu, Nov 17, 2022 at 7:52 PM G. Branden Robinson <INVALID.NOREPLY@gnu.org> wrote:
Follow-up Comment #1, bug #63380 (project groff):

Hi Blake,

Here's a patch, courtesy of Deri James.


diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 07c65b8ea..739dad4e4 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -1491,6 +1491,22 @@ sub FixRect
     return if !defined($rect);
     $rect->[1]=GraphY($rect->[1]);
     $rect->[3]=GraphY($rect->[3]);
+
+    if ($rot)
+    {
+       ($rect->[0],$rect->[1])=Rotate($rect->[0],$rect->[1]);
+       ($rect->[2],$rect->[3])=Rotate($rect->[2],$rect->[3]);
+    }
+}
+
+sub Rotate
+{
+    my ($tx,$ty)=(@_);
+    my $theta=rad($rot);
+
+    ($tx,$ty)=(d3($tx * cos(-$theta) - $ty * sin(-$theta)),
+              d3($tx * sin( $theta) + $ty * cos( $theta)));
+    return($tx,$ty);
 }

 sub GetPoints



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63380>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]