summaryrefslogtreecommitdiff
path: root/textproc/p5-Text-Graphics/files/patch-Graphics.pm
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2000-12-31 05:38:41 +0000
committerWill Andrews <will@FreeBSD.org>2000-12-31 05:38:41 +0000
commit5f0157d55c130c545c5dcb012da8c8da5159f793 (patch)
tree3ea7bb69474bec3828e7b9c21e4d3e4bebbe509f /textproc/p5-Text-Graphics/files/patch-Graphics.pm
parentAdd p5-Text-Wrapper 1.000, a perl module that includes a simple word (diff)
Add p5-Text-Graphics 1.0001, a perl module (toolkit) for rendering
textual graphics. PR: 23965 Submitted by: Anton Berezin <tobez@tobez.org>
Diffstat (limited to '')
-rw-r--r--textproc/p5-Text-Graphics/files/patch-Graphics.pm30
1 files changed, 30 insertions, 0 deletions
diff --git a/textproc/p5-Text-Graphics/files/patch-Graphics.pm b/textproc/p5-Text-Graphics/files/patch-Graphics.pm
new file mode 100644
index 000000000000..8019acad80b8
--- /dev/null
+++ b/textproc/p5-Text-Graphics/files/patch-Graphics.pm
@@ -0,0 +1,30 @@
+--- lib/Text/Graphics.pm.orig Sat Dec 30 20:01:06 2000
++++ lib/Text/Graphics.pm Sat Dec 30 20:02:21 2000
+@@ -49,8 +49,8 @@
+ my $child = shift;
+ my $offx = shift;
+ my $offy = shift;
+- $child->{offx} = ($offx > 0) ? $offx : 0;
+- $child->{offy} = ($offy > 0) ? $offy : 0;
++ $child->{offx} = (defined($offx) && $offx > 0) ? $offx : 0;
++ $child->{offy} = (defined($offy) && $offy > 0) ? $offy : 0;
+ $child->{parent} = $this;
+
+ push @{ $this->{children} }, $child;
+@@ -78,7 +78,7 @@
+ my $this = shift;
+ my $gc = shift;
+
+- if ($this->{bg} ne undef) {
++ if (defined $this->{bg}) {
+ $gc->fillRect($this->{bg}, 0, 0, $this->{width}, $this->{height});
+ }
+ }
+@@ -413,7 +413,7 @@
+ ## we need to re-wrap iff the width changes
+ ##
+
+- if (($width ne undef) and ($this->{width} != $width)) {
++ if ((defined $width) and ($this->{width} != $width)) {
+ delete $this->{text_was_wrapped};
+ }