From d9e047e5d5560912da6d2860fa25e427322f08bb Mon Sep 17 00:00:00 2001 From: Mathieu Lonjaret Date: Thu, 4 Feb 2010 02:05:03 -0800 Subject: R=rsc CC=codebot http://codereview.appspot.com/193069 --- src/cmd/page/page.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/cmd/page/page.h') diff --git a/src/cmd/page/page.h b/src/cmd/page/page.h index 93e0da79..7d3c4b86 100644 --- a/src/cmd/page/page.h +++ b/src/cmd/page/page.h @@ -12,6 +12,7 @@ struct Document { int (*rmpage)(Document*, int); Biobuf *b; void *extra; + int type; }; typedef struct Graphic Graphic; @@ -37,6 +38,12 @@ enum { Ibmp, }; +enum { + Tgfx, + Tpdf, + Tps, +} +; void *emalloc(int); void *erealloc(void*, int); @@ -65,6 +72,7 @@ extern int truetoboundingbox; extern int wctlfd; extern int resizing; extern int mknewwindow; +extern int fitwin; void rot180(Image*); Image *rot90(Image*); @@ -73,6 +81,9 @@ Image *resample(Image*, Image*); /* ghostscript interface shared by ps, pdf */ typedef struct GSInfo GSInfo; +typedef struct PDFInfo PDFInfo; +typedef struct Page Page; +typedef struct PSInfo PSInfo; struct GSInfo { Graphic g; int gsfd; @@ -80,6 +91,24 @@ struct GSInfo { int gspid; int ppi; }; +struct PDFInfo { + GSInfo gs; + Rectangle *pagebbox; +}; +struct Page { + char *name; + int offset; /* offset of page beginning within file */ +}; +struct PSInfo { + GSInfo gs; + Rectangle bbox; /* default bounding box */ + Page *page; + int npage; + int clueless; /* don't know where page boundaries are */ + long psoff; /* location of %! in file */ + char ctm[256]; +}; + void waitgs(GSInfo*); int gscmd(GSInfo*, char*, ...); int spawngs(GSInfo*, char*); @@ -98,6 +127,7 @@ int bell(void*, char*); Image* convert(Graphic *g); Image* cachedpage(Document*, int, int); void cacheflush(void); +void fit(void); extern char tempfile[40]; -- cgit v1.2.3