OBS User unknown 2007-01-15 23:30:40 +00:00 committed by Git OBS Bridge
commit bbdee9ce1a
6 changed files with 261 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
GD-Graph3d-0.63.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d6926646b37c5538bd0dd2202ff83bf964613fbe27669d3c7fea7236c028adb
size 99031

125
GD-Graph3d-trim_miter.diff Normal file
View File

@ -0,0 +1,125 @@
--- GD-Graph3d-0.63/lib/GD/Graph/lines3d.pm.orig 2002-12-06 21:14:55.000000000 +0100
+++ GD-Graph3d-0.63/lib/GD/Graph/lines3d.pm 2005-03-03 16:08:02.570748909 +0100
@@ -47,6 +47,7 @@
# The depth of the line in their extrusion
line_depth => 10,
+ trim_miter => 0,
);
sub initialise()
@@ -83,6 +84,12 @@
delete $args{$_};
next;
};
+ /^trim_miter$/ and do
+ {
+ $s->{trim_miter} = $args{$_};
+ delete $args{$_};
+ next;
+ };
}
return $s->SUPER::set(%args);
@@ -238,7 +245,7 @@
} # end if
# Draw the line segment
- $self->draw_line( $points_cache[$i - 1][$j],
+ my $poly_style = $self->draw_line( $points_cache[$i - 1][$j],
$points_cache[$i][$j],
$points_cache[$i + 1][$j],
$type,
@@ -256,6 +263,12 @@
} else {
$g->filledPolygon( $poly, $dsci );
} # end if
+
+ # Hmm, the if's in draw_line are much more elaborated
+ # than the one above. A direct copy does not look too bad.
+ # FIXME, 2005-03-003, jw@suse.de
+ $g->filledPolygon( $poly, $poly_style );
+
$g->polygon( $poly, $self->{fgci} );
} # end if
@@ -426,6 +439,23 @@
$this->{face}[2] = ($bn - $bt) / ($mt - $mn);
} # end if
$this->{face}[3] = $mt * $this->{face}[2] + $bt;
+ if ($self->{trim_miter})
+ {
+ if (($mt > 1) && ($mn < -1))
+ {
+ $this->{trim23}[2] = $xe + $lwxoff + $lwyoff;
+ $this->{trim23}[3] = $ye + $lwyoff - $lwxoff;
+ $this->{face}[2] = $xe + $lwxo2 - $lwyo2;
+ $this->{face}[3] = $ye + $lwyo2 + $lwxo2;
+ }
+ elsif (($mt < -1) && ($mn > 1))
+ {
+ $this->{trim01}[0] = $xe - $lwxoff + $lwyoff;
+ $this->{trim01}[1] = $ye - $lwyoff - $lwxoff;
+ $this->{face}[0] = $xe - $lwxo2 - $lwyo2;
+ $this->{face}[1] = $ye - $lwyo2 + $lwxo2;
+ }
+ }
} # end if
@@ -462,6 +492,19 @@
} # end if
$self->{graph}->polygon( $poly, $self->{fgci} );
+ if ($this->{trim01})
+ {
+ ## upper trim caps are always visible. lower trim caps never.
+ $poly = new GD::Polygon;
+ my $ld = $self->{line_depth};
+ $poly->addPt($this->{trim01}[0] , $this->{trim01}[1] );
+ $poly->addPt($this->{trim01}[0] + $ld, $this->{trim01}[1] - $ld);
+ $poly->addPt($this->{face}[0] + $ld, $this->{face}[1] - $ld);
+ $poly->addPt($this->{face}[0] , $this->{face}[1] );
+ $self->{graph}->filledPolygon( $poly, $style );
+ $self->{graph}->polygon( $poly, $self->{fgci} );
+ }
+
# *** This paints dashed and dotted patterns on the faces of
# the polygons. They don't look very good though. Would it
# be better to extrude the style as well as the lines?
@@ -472,13 +515,18 @@
# Make the face polygon
$poly = new GD::Polygon;
$poly->addPt( $prev->{face}[0], $prev->{face}[1] );
+ $poly->addPt( $this->{trim01}[0], $this->{trim01}[1] ) if $this->{trim01};
$poly->addPt( $this->{face}[0], $this->{face}[1] );
$poly->addPt( $this->{face}[2], $this->{face}[3] );
+ $poly->addPt( $this->{trim23}[2], $this->{trim23}[3] ) if $this->{trim23};
$poly->addPt( $prev->{face}[2], $prev->{face}[3] );
$self->{graph}->filledPolygon( $poly, $style );
$self->{graph}->polygon( $poly, $self->{fgci} );
+# $self->{graph}->arc($xe,$ye, 10,10, 0, 360, 1); # show centers for debugging.
+ return $style;
+
} # end draw line
# ----------------------------------------------------------
--- GD-Graph3d-0.63/lib/GD/Graph3d.pm.orig 2002-12-06 21:14:16.000000000 +0100
+++ GD-Graph3d-0.63/lib/GD/Graph3d.pm 2005-03-03 16:18:17.138907917 +0100
@@ -106,6 +106,14 @@
users. You can disable the shading of lines and axes by specifiying a false
value for this option.
+=item trim_miter
+
+By default this is set to '0'. If line_width is large, typical zig-zag data
+lines may appear to exaggerated, due to the width of the lines.
+When trim_miter is set to '1', then acute-angled segments are cut back
+(with an additional small rectangle on top) to extend only half a line_width
+beyond the data points.
+
=back
=back

31
perl-GD-Graph3d.changes Normal file
View File

@ -0,0 +1,31 @@
-------------------------------------------------------------------
Wed Jan 25 21:39:42 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Thu Mar 3 18:08:41 CET 2005 - ro@suse.de
- added trim_miter patch from Juergen
-------------------------------------------------------------------
Thu Jul 29 00:38:36 CEST 2004 - ro@suse.de
- update to 0.63
- renamed from perl-GDGraph3d to perl-GD-Graph3d
-------------------------------------------------------------------
Sat Jan 10 21:59:17 CET 2004 - adrian@suse.de
- build as user
-------------------------------------------------------------------
Thu Nov 20 15:58:31 CET 2003 - ro@suse.de
- added requires
-------------------------------------------------------------------
Thu Nov 20 15:51:09 CET 2003 - ro@suse.de
- created package version 0.56

79
perl-GD-Graph3d.spec Normal file
View File

@ -0,0 +1,79 @@
#
# spec file for package perl-GD-Graph3d (Version 0.63)
#
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# norootforbuild
Name: perl-GD-Graph3d
BuildRequires: libjpeg-devel perl-GD perl-GDGraph perl-GDTextUtil xorg-x11-devel
Version: 0.63
Release: 3
Requires: perl = %{perl_version}
Requires: perl-GD perl-GDGraph perl-GDTextUtil
Provides: perl-GDGraph3d
Obsoletes: perl-GDGraph3d
Autoreqprov: on
Group: Development/Libraries/Perl
License: Artistic License
Url: http://cpan.org/modules/by-module/GD/
Summary: 3d extension for perl-GDGraph
Source: GD-Graph3d-%{version}.tar.bz2
Patch: GD-Graph3d-trim_miter.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This is the GD::Graph3d extensions module. It provides 3D graphs for
the GD::Graph module by Martien Verbruggen, which in turn generates
graph using Lincoln Stein's GD.pm.
Authors:
--------
Jeremy Wadsack <dgsupport@wadsack-allen.com>
%prep
%setup -n GD-Graph3d-%{version}
%patch -p1
%build
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
make
make test
%install
rm -rf $RPM_BUILD_ROOT
%perl_make_install
%perl_process_packlist
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc %{_mandir}/man?/*
%{perl_vendorarch}/auto/GD/Graph3d
%{perl_vendorlib}/GD/Graph
%{perl_vendorlib}/GD/Graph3d.pm
/var/adm/perl-modules/%{name}
%changelog -n perl-GD-Graph3d
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Mar 03 2005 - ro@suse.de
- added trim_miter patch from Juergen
* Thu Jul 29 2004 - ro@suse.de
- update to 0.63
- renamed from perl-GDGraph3d to perl-GD-Graph3d
* Sat Jan 10 2004 - adrian@suse.de
- build as user
* Thu Nov 20 2003 - ro@suse.de
- added requires
* Thu Nov 20 2003 - ro@suse.de
- created package version 0.56

0
ready Normal file
View File