Accepting request 57928 from graphics
Accepted submit request 57928 from user mrdocs OBS-URL: https://build.opensuse.org/request/show/57928 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/potrace?expand=0&rev=10
This commit is contained in:
parent
4ddbd9fb5e
commit
dd25114b20
@ -1,114 +0,0 @@
|
|||||||
Index: ChangeLog
|
|
||||||
===================================================================
|
|
||||||
--- ChangeLog (revision 153)
|
|
||||||
+++ ChangeLog (revision 154)
|
|
||||||
@@ -1,5 +1,9 @@
|
|
||||||
ChangeLog
|
|
||||||
|
|
||||||
+ (2007/05/22) PS1 - xfig backend: added depth to opaque components
|
|
||||||
+ to avoid them floating to the background. Suggested by Rafael
|
|
||||||
+ Laboissiere.
|
|
||||||
+
|
|
||||||
v1.8 2007/04/09
|
|
||||||
(2007/04/08) PS1 - portability: use 'test' instead of '[' in shell
|
|
||||||
scripts.
|
|
||||||
Index: src/backend_xfig.c
|
|
||||||
===================================================================
|
|
||||||
--- src/backend_xfig.c (revision 153)
|
|
||||||
+++ src/backend_xfig.c (revision 154)
|
|
||||||
@@ -124,13 +124,13 @@
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* do one path. First should be 1 on the very first path, else 0. */
|
|
||||||
-static int xfig_path(FILE *fout, potrace_curve_t *curve, trans_t t, int sign) {
|
|
||||||
+/* do one path. */
|
|
||||||
+static void xfig_path(FILE *fout, potrace_curve_t *curve, trans_t t, int sign, int depth) {
|
|
||||||
int i;
|
|
||||||
dpoint_t *c;
|
|
||||||
int m = curve->n;
|
|
||||||
|
|
||||||
- fprintf(fout, "3 1 0 0 0 %d 50 0 20 0.000 0 0 0 %d\n", sign=='+' ? 32 : 33, npoints(curve, m));
|
|
||||||
+ fprintf(fout, "3 1 0 0 0 %d %d 0 20 0.000 0 0 0 %d\n", sign=='+' ? 32 : 33, depth, npoints(curve, m));
|
|
||||||
|
|
||||||
for (i=0; i<m; i++) {
|
|
||||||
c = curve->c[i];
|
|
||||||
@@ -154,15 +154,43 @@
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* render a whole tree */
|
|
||||||
+static void xfig_write_paths(FILE *fout, potrace_path_t *plist, trans_t t, int depth) {
|
|
||||||
+ potrace_path_t *p, *q;
|
|
||||||
+
|
|
||||||
+ for (p=plist; p; p=p->sibling) {
|
|
||||||
+ xfig_path(fout, &p->curve, t, p->sign, depth);
|
|
||||||
+ for (q=p->childlist; q; q=q->sibling) {
|
|
||||||
+ xfig_path(fout, &q->curve, t, q->sign, depth >= 1 ? depth-1 : 0);
|
|
||||||
+ }
|
|
||||||
+ for (q=p->childlist; q; q=q->sibling) {
|
|
||||||
+ xfig_write_paths(fout, q->childlist, t, depth >= 2 ? depth-2 : 0);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* calculate the depth of a tree. Call with d=0. */
|
|
||||||
+static int xfig_get_depth(potrace_path_t *plist) {
|
|
||||||
+ potrace_path_t *p;
|
|
||||||
+ int max =0;
|
|
||||||
+ int d;
|
|
||||||
+
|
|
||||||
+ for (p=plist; p; p=p->sibling) {
|
|
||||||
+ d = xfig_get_depth(p->childlist);
|
|
||||||
+ if (d > max) {
|
|
||||||
+ max = d;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return max + 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/* Backend. */
|
|
||||||
|
|
||||||
/* public interface for XFIG */
|
|
||||||
int page_xfig(FILE *fout, potrace_path_t *plist, imginfo_t *imginfo) {
|
|
||||||
- potrace_path_t *p;
|
|
||||||
trans_t t;
|
|
||||||
double si, co;
|
|
||||||
double origx = imginfo->trans.orig[0] + imginfo->lmar;
|
|
||||||
@@ -174,6 +202,7 @@
|
|
||||||
pageformat_t *f;
|
|
||||||
int i;
|
|
||||||
int x0, y0, x1, y1; /* in xfig's coordinates */
|
|
||||||
+ int depth;
|
|
||||||
|
|
||||||
si = sin(info.angle/180*M_PI);
|
|
||||||
co = cos(info.angle/180*M_PI);
|
|
||||||
@@ -220,11 +249,21 @@
|
|
||||||
fprintf(fout, "0 33 #%06x\n", info.fillcolor);
|
|
||||||
fprintf(fout, "6 %d %d %d %d\n", x0-75, y1-35, x1+75, y0+35); /* bounding box */
|
|
||||||
|
|
||||||
+ /* determine depth of the tree */
|
|
||||||
+ depth = xfig_get_depth(plist);
|
|
||||||
+
|
|
||||||
+ /* figure out appropriate xfig starting depth. Note: xfig only has 1000 depths available */
|
|
||||||
+ if (depth <= 40) {
|
|
||||||
+ depth = 50;
|
|
||||||
+ } else if (depth < 990) {
|
|
||||||
+ depth += 10;
|
|
||||||
+ } else {
|
|
||||||
+ depth = 999;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* write paths. Note: can never use "opticurve" with this backend -
|
|
||||||
it just does not approximate Bezier curves closely enough. */
|
|
||||||
- list_forall (p, plist) {
|
|
||||||
- xfig_path(fout, &p->curve, t, p->sign);
|
|
||||||
- }
|
|
||||||
+ xfig_write_paths(fout, plist, t, depth);
|
|
||||||
|
|
||||||
fprintf(fout, "-6\n"); /* end bounding box */
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:417cb87251bce541c2cce1620afeceffc87f7e5fe38c117af8c9ae07a00f15c4
|
|
||||||
size 302204
|
|
3
potrace-1.9.tar.bz2
Normal file
3
potrace-1.9.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cbf66910151700ad1dfefcb3fbb415fe8e03cb1759831b7f1dc73346289ab5db
|
||||||
|
size 497025
|
@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 11 23:16:21 UTC 2011 - mrdocs@opensuse.org
|
||||||
|
|
||||||
|
-Update to 1.9
|
||||||
|
+the XFig and EPS backends were improved, and a fixed pagesize PDF backend was added;
|
||||||
|
+ support for BMP version 4 and version 5 files, as well as top-down BMP files, was added;
|
||||||
|
+ you'll see minor speed improvements to Potrace and major speed improvements to mkbitmap;
|
||||||
|
+ a Gaussian blur option was added to mkbitmap;
|
||||||
|
+ a change in the build sustem: libtool is now used to build and optionally install the Potrace library;
|
||||||
|
+ an optional simplified progress bar was added for dumb terminals;
|
||||||
|
+ this release also contains some portability improvements, cross-compilation improvements, and minor bug fixes.
|
||||||
|
|
||||||
|
- run spec cleaner on the spec file and remove redundant changes from spec
|
||||||
|
- drop xfig-patch as it is upstream now
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 26 18:46:12 CEST 2007 - sbrabec@suse.cz
|
Thu Jul 26 18:46:12 CEST 2007 - sbrabec@suse.cz
|
||||||
|
|
||||||
|
44
potrace.spec
44
potrace.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package potrace (Version 1.8)
|
# spec file for package potrace (Version 1.9)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
Name: potrace
|
Name: potrace
|
||||||
Summary: Utility for Tracing a Bitmap to Scalable Outline Image
|
Summary: Utility for Tracing a Bitmap to Scalable Outline Image
|
||||||
Version: 1.8
|
Version: 1.9
|
||||||
Release: 82
|
Release: 0
|
||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: Productivity/Graphics/Convertors
|
Group: Productivity/Graphics/Convertors
|
||||||
BuildRequires: licenses zlib-devel
|
BuildRequires: licenses zlib-devel
|
||||||
@ -29,7 +29,6 @@ Requires: licenses
|
|||||||
Provides: bitmap_tracing
|
Provides: bitmap_tracing
|
||||||
Url: http://potrace.sourceforge.net/
|
Url: http://potrace.sourceforge.net/
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
Patch: %{name}-%{version}-xfig.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -49,12 +48,12 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup
|
||||||
%patch
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -f -i
|
autoreconf -f -i
|
||||||
%configure
|
%configure
|
||||||
make %{?jobs:-j%jobs}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%makeinstall
|
%makeinstall
|
||||||
@ -70,35 +69,4 @@ rm -fr $RPM_BUILD_ROOT
|
|||||||
%doc %{_mandir}/man?/*.*
|
%doc %{_mandir}/man?/*.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Jul 26 2007 sbrabec@suse.cz
|
|
||||||
- Updated to version 1.8:
|
|
||||||
* minor bugfixes and portability improvements
|
|
||||||
* rotation is now implemented in the PDF backend
|
|
||||||
* Thu Mar 29 2007 rguenther@suse.de
|
|
||||||
- add zlib-devel BuildRequires.
|
|
||||||
* Wed Nov 15 2006 jw@suse.de
|
|
||||||
- replaced wrong_allocation.patch by official
|
|
||||||
io.patch -- more bugs fixed.
|
|
||||||
* Wed Jul 19 2006 pnemec@suse.cz
|
|
||||||
- fixed wrong memory allocation in potracelib.c
|
|
||||||
(added potrace-wrong_allocation.patch)
|
|
||||||
* Wed Jan 25 2006 mls@suse.de
|
|
||||||
- converted neededforbuild to BuildRequires
|
|
||||||
* Wed Mar 09 2005 nadvornik@suse.cz
|
|
||||||
- Updated to version 1.7:
|
|
||||||
* A bug in the progress bar code, which caused arithmetic
|
|
||||||
exceptions on some 64-bit architectures, has been fixed.
|
|
||||||
* Mon Feb 28 2005 sbrabec@suse.cz
|
|
||||||
- Updated to version 1.6.
|
|
||||||
* Thu Jan 06 2005 sbrabec@suse.cz
|
|
||||||
- Provide bitmap_tracing virtual.
|
|
||||||
* Fri Aug 27 2004 sbrabec@suse.cz
|
|
||||||
- Updated to version 1.5 (with LZW support).
|
|
||||||
* Mon Mar 08 2004 sbrabec@suse.cz
|
|
||||||
- Updated to version 1.4.
|
|
||||||
* Thu Feb 05 2004 sbrabec@suse.cz
|
|
||||||
- Added speed optimization patch from author.
|
|
||||||
* Thu Jan 15 2004 sbrabec@suse.cz
|
|
||||||
- Updated to version 1.3.
|
|
||||||
* Wed Aug 13 2003 sbrabec@suse.cz
|
|
||||||
- Initial version 1.0.
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user