From 460f44b366bd1788bf5e9aacb3c30fe7caf7e9a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Sun, 10 Jul 2011 10:03:53 +0000 Subject: [PATCH] use pdf for png creation git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@3191 069f4177-920e-0410-937b-c2a4a81bcd90 --- manual/Makefile | 4 ++-- manual/arrows.py | 3 +-- manual/bitmap.py | 3 +-- manual/boxalign.py | 3 +-- manual/color.py | 3 +-- manual/colorname.py | 3 +-- manual/connector.py | 3 +-- manual/gradientname.py | 3 +-- manual/graph.py | 3 +-- manual/graph2.py | 3 +-- manual/graph3.py | 3 +-- manual/pathstyles.py | 3 +-- manual/radii.py | 3 +-- manual/radii2.py | 3 +-- manual/rects.py | 5 ++--- manual/textvalign.py | 3 +-- 16 files changed, 18 insertions(+), 33 deletions(-) diff --git a/manual/Makefile b/manual/Makefile index e89e2df9..d8e7058f 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -20,7 +20,7 @@ all: html latexpdf @echo "Done." clean: - -rm -rf $(BUILDDIR)/* *.eps *.pdf *.png + -rm -rf $(BUILDDIR)/* *.pdf *.png html: figs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @@ -36,4 +36,4 @@ figs: $(patsubst %.py, %.png, $(filter-out conf.py,$(wildcard *.py))) %.png: %.py export PYTHONPATH=$(CURDIR)/.. ; $(PYTHON) $^ - $(PYTHON) ../contrib/epstopng.py -o $@ $*.eps + $(PYTHON) ../contrib/epstopng.py -o $@ $*.pdf diff --git a/manual/arrows.py b/manual/arrows.py index 131c2393..9bd83e81 100755 --- a/manual/arrows.py +++ b/manual/arrows.py @@ -47,5 +47,4 @@ drawdeco("earrow.normal(constriction=None)") drawdeco("earrow.Large([style.linejoin.round])") drawdeco("earrow.Large([deco.stroked.clear])") -c.writeEPSfile("arrows") -c.writePDFfile("arrows") +c.writePDFfile() diff --git a/manual/bitmap.py b/manual/bitmap.py index 621f8f05..fb35e3d9 100644 --- a/manual/bitmap.py +++ b/manual/bitmap.py @@ -10,6 +10,5 @@ bitmap_rgb = bitmap.bitmap(0, 0, image_rgb, height=0.8) c = canvas.canvas() c.insert(bitmap_bw) c.insert(bitmap_rgb) -c.writeEPSfile("bitmap") -c.writePDFfile("bitmap") +c.writePDFfile() diff --git a/manual/boxalign.py b/manual/boxalign.py index 5dbcc069..61bc4c25 100644 --- a/manual/boxalign.py +++ b/manual/boxalign.py @@ -16,6 +16,5 @@ c.stroke(path.line(5 + 1.5 * math.sqrt(2), -0.5 * math.sqrt(2), 5 - 0.5 * math.s c.stroke(t2.path(centerradius=0.05), [style.linewidth.THin]) c.stroke(path.line(5, 0, 5 + x, y), [deco.earrow.normal]) c.insert(t2) -c.writeEPSfile("boxalign") -c.writePDFfile("boxalign") +c.writePDFfile() diff --git a/manual/color.py b/manual/color.py index e3852ac4..a0765114 100755 --- a/manual/color.py +++ b/manual/color.py @@ -8,6 +8,5 @@ c.fill(path.rect(0, 0, 7, 3), [color.gray(0.8)]) c.fill(path.rect(1, 1, 1, 1), [color.rgb.red]) c.fill(path.rect(3, 1, 1, 1), [color.rgb.green]) c.fill(path.rect(5, 1, 1, 1), [color.rgb.blue]) -c.writeEPSfile("color") -c.writePDFfile("color") +c.writePDFfile() diff --git a/manual/colorname.py b/manual/colorname.py index 35ad28d5..e683f2be 100755 --- a/manual/colorname.py +++ b/manual/colorname.py @@ -42,5 +42,4 @@ for line in lines: # we yet don't use a file iterator y = 0 x += dx -c.writeEPSfile("colorname") -c.writePDFfile("colorname") +c.writePDFfile() diff --git a/manual/connector.py b/manual/connector.py index ebfe1b62..74183c72 100755 --- a/manual/connector.py +++ b/manual/connector.py @@ -119,7 +119,6 @@ c2.text(pos[0], pos[1], r"~(rel)bulge", [text.halign.left, text.vshift(1)]) # write everything c1.insert(c2, [trafo.translate(6.5, 0)]) -c1.writeEPSfile("connector", paperformat=document.paperformat.A4) -c1.writePDFfile("connector") +c1.writePDFfile() # vim:foldmethod=marker:foldmarker=<<<,>>> diff --git a/manual/gradientname.py b/manual/gradientname.py index 8c72b639..4e66461f 100755 --- a/manual/gradientname.py +++ b/manual/gradientname.py @@ -45,5 +45,4 @@ for line in lines: # we yet don't use a file iterator y += dy -c.writeEPSfile("gradientname") -c.writePDFfile("gradientname") +c.writePDFfile() diff --git a/manual/graph.py b/manual/graph.py index 80d39e50..6d69d018 100755 --- a/manual/graph.py +++ b/manual/graph.py @@ -1,5 +1,4 @@ from pyx import * g = graph.graphxy(width=8) g.plot(graph.data.file("graph.dat", x=1, y=2)) -g.writeEPSfile("graph") -g.writePDFfile("graph") +g.writePDFfile() diff --git a/manual/graph2.py b/manual/graph2.py index 7cb18af6..20838f40 100755 --- a/manual/graph2.py +++ b/manual/graph2.py @@ -2,5 +2,4 @@ from pyx import * g = graph.graphxy(width=8) g.plot(graph.data.file("graph.dat", x=1, y=2)) g.plot(graph.data.function("y(x)=x**2")) -g.writeEPSfile("graph2") -g.writePDFfile("graph2") +g.writePDFfile() diff --git a/manual/graph3.py b/manual/graph3.py index afa819ba..0fda6a4e 100644 --- a/manual/graph3.py +++ b/manual/graph3.py @@ -2,5 +2,4 @@ from pyx import * g = graph.graphxy(width=8, x=graph.axis.linear(min=-5, max=5), y=graph.axis.logarithmic()) g.plot(graph.data.function("y(x)=exp(x)")) -g.writeEPSfile("graph3") -g.writePDFfile("graph3") +g.writePDFfile() diff --git a/manual/pathstyles.py b/manual/pathstyles.py index ff394528..49123678 100755 --- a/manual/pathstyles.py +++ b/manual/pathstyles.py @@ -79,5 +79,4 @@ drawstyle("dash((1, 2, 3), 4)") drawstyle("dash((1, 2, 3), rellengths=1)") -c.writeEPSfile("pathstyles") -c.writePDFfile("pathstyles") +c.writePDFfile() diff --git a/manual/radii.py b/manual/radii.py index 1634ceaa..54ab5c87 100644 --- a/manual/radii.py +++ b/manual/radii.py @@ -12,5 +12,4 @@ for isect in isects_circle: isectx, isecty = circle.at(isect) c.stroke(path.line(0, 0, isectx, isecty)) -c.writeEPSfile("radii") -c.writePDFfile("radii") +c.writePDFfile() diff --git a/manual/radii2.py b/manual/radii2.py index 6a074b05..8fba092f 100644 --- a/manual/radii2.py +++ b/manual/radii2.py @@ -23,5 +23,4 @@ c.stroke(line, [style.linewidth.Thick]) for isect in isects_circle: c.stroke(path.line(0, 0, *circle.at(isect))) -c.writeEPSfile("radii2") -c.writePDFfile("radii2") +c.writePDFfile() diff --git a/manual/rects.py b/manual/rects.py index 53416bee..39a5dcc8 100644 --- a/manual/rects.py +++ b/manual/rects.py @@ -24,8 +24,7 @@ c.text(5, -0.7, "(b)", [text.halign.center]) c.stroke(rect3, [trafo.scale(2).translated(8, 0), style.linewidth.THICK]) c.text(9, -0.7, "(c)", [text.halign.center]) -c.stroke(rect3, [trafo.scale(2).translated(12, 0), style.linewidth.THICK, deco.filled([color.grey(0.95)])]) +c.stroke(rect3, [trafo.scale(2).translated(12, 0), style.linewidth.THICK, deco.filled([color.grey(0.5)])]) c.text(13, -0.7, "(d)", [text.halign.center]) -c.writeEPSfile("rects") -c.writePDFfile("rects") +c.writePDFfile() diff --git a/manual/textvalign.py b/manual/textvalign.py index 0c2069e1..a56960ae 100644 --- a/manual/textvalign.py +++ b/manual/textvalign.py @@ -21,5 +21,4 @@ c.text(7.7, 0.5*(b.bottom()-b2.bottom()), "parbox.middle", [text.vshift.mathaxis c.stroke(path.line(0, b.bottom()-b2.bottom(), 7.2, b.bottom()-b2.bottom())) c.stroke(path.line(7.3, b.bottom()-b2.bottom(), 7.5, b.bottom()-b2.bottom()), [deco.barrow.Small]) c.text(7.7, b.bottom()-b2.bottom(), "parbox.bottom", [text.vshift.mathaxis]) -c.writeEPSfile("textvalign") -c.writePDFfile("textvalign") +c.writePDFfile() -- 2.11.4.GIT