[Commit] papers/xr_ols2003 introduction.tex,1.4,1.5

Keith Packard commit@keithp.com
Thu, 15 May 2003 20:15:30 -0700

Committed by: keithp

Update of /local/src/CVS/papers/xr_ols2003
In directory home.keithp.com:/tmp/cvs-serv19762

Modified Files:
Log Message:
Start on introduction prose

Index: introduction.tex
RCS file: /local/src/CVS/papers/xr_ols2003/introduction.tex,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- introduction.tex	15 May 2003 17:34:17 -0000	1.4
+++ introduction.tex	16 May 2003 03:15:28 -0000	1.5
@@ -1,5 +1,32 @@
+\subsection{Vector Graphics}
+\subsection{Xr Programming Interface}
+While the goal of the Xr library is to provide a PDF 1.4 imaging model, PDF
+doesn't provide any programming language interface.  Xr borrows it's
+imperative immediate mode model from PostScript operators.  However, instead
+of proposing a complete new programming language to encapsulate these
+operators, Xr uses C functions for the operations and expects the developer
+to use C instead of PostScript to implement the application part of the
+rendering system.  This dramatically reduces the number of operations needed
+by the library as only those directly involved in graphics need be
+provided.  The large number of PostScript operators that support a complete
+language are more than adequately replaced by the C programming language.
+PostScript encapsulates rendering state in a global opaque object and
+provides simple operators to change various aspects of that state, from
+color to line width and dash patterns.  Because global objects can cause
+various problems in C library interfaces, the graphics state in Xr is held
+in a structure that is passed to each of the library functions.
+The translation from PostScript operators to the Xr interface is
+straightforward.  For example, the \texttt{lineto} operator translates to
+the \texttt{XrLineTo} function.  The coordinates of the line endpoint needed
+by the operator are preceded by the graphics state object in the Xr
 % I thought it might be nice to get tux onto the front page.
 % Maybe a discussion/comparison of raster vs. vector image descriptions