summaryrefslogtreecommitdiff
path: root/bk_ps.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-04-13 20:03:39 +0000
committerSimon Tatham <anakin@pobox.com>2004-04-13 20:03:39 +0000
commit569cdd4e0fa853f013c3b9f868ef0ef890005b29 (patch)
treed7cbbf389cfb1ab9fb27d5c043526b3041d96723 /bk_ps.c
parent093ff06eca116ac8d6dfa01d5d25473f91dc2d11 (diff)
downloadhalibut-569cdd4e0fa853f013c3b9f868ef0ef890005b29.zip
halibut-569cdd4e0fa853f013c3b9f868ef0ef890005b29.tar.gz
halibut-569cdd4e0fa853f013c3b9f868ef0ef890005b29.tar.bz2
halibut-569cdd4e0fa853f013c3b9f868ef0ef890005b29.tar.xz
Implemented lines under chapter titles.
[originally from svn r4065]
Diffstat (limited to 'bk_ps.c')
-rw-r--r--bk_ps.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/bk_ps.c b/bk_ps.c
index ae1feae..1ed3610 100644
--- a/bk_ps.c
+++ b/bk_ps.c
@@ -106,11 +106,12 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords,
fprintf(fp, "%%%%EndSetup\n");
/*
- * Output the text.
+ * Output the text and graphics.
*/
pageno = 0;
for (page = doc->pages; page; page = page->next) {
text_fragment *frag;
+ rect *r;
pageno++;
fprintf(fp, "%%%%Page: %d %d\n", pageno, pageno);
@@ -137,6 +138,13 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords,
}
#endif
+ for (r = page->first_rect; r; r = r->next) {
+ fprintf(fp, "%g %g moveto %g 0 rlineto 0 %g rlineto "
+ "-%g 0 rlineto closepath fill\n",
+ r->x / 4096.0, r->y / 4096.0, r->w / 4096.0,
+ r->h / 4096.0, r->w / 4096.0);
+ }
+
for (frag = page->first_text; frag; frag = frag->next) {
char *c;