[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #63380] [gropdf] hyperlink doesn't work in landscape orientation
From: |
G. Branden Robinson |
Subject: |
[bug #63380] [gropdf] hyperlink doesn't work in landscape orientation |
Date: |
Thu, 17 Nov 2022 20:52:14 -0500 (EST) |
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/