[Commit] papers/xr_ols2003 api.tex,1.6,1.7 appendix.tex,1.3,1.4 introduction.tex,1.9,1.10

Carl Worth commit@keithp.com
Thu, 15 May 2003 22:37:32 -0700


Committed by: cworth

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

Modified Files:
	api.tex appendix.tex introduction.tex 
Log Message:
Added source code for splines figure.
Removed \texttt from function names.

Index: api.tex
===================================================================
RCS file: /local/src/CVS/papers/xr_ols2003/api.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- api.tex	16 May 2003 04:56:02 -0000	1.6
+++ api.tex	16 May 2003 05:37:30 -0000	1.7
@@ -79,7 +79,7 @@
 surface, and the program can access that surface as appropriate, (eg.
 write the image to a file, display the graphics on the screen, etc.).
 
-Sections~\ref{sec:transformations}-\ref{sec:patterns} provide examples
+Sections~\ref{sec:transformations}-\ref{sec:paint} provide examples
 that build on this initial program. Each example consists of a single
 function that accepts an XrState pointer and performs drawing
 operations. Each example can be made into a complete program by simply
@@ -290,7 +290,8 @@
 DPI display. The user can increase the tolerance value to tradeoff
 rendering accuracy for performance. Figure~\ref{fig:splines_tolerance}
 display the same curved path rendered several times with increasing
-tolerance values.
+tolerance values. Figure~\ref{fig:splines_tolerance_source} contains
+the source code for this figure.
 
 \begin{figure}[htbp]
   \begin{center}

Index: appendix.tex
===================================================================
RCS file: /local/src/CVS/papers/xr_ols2003/appendix.tex,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- appendix.tex	15 May 2003 20:20:22 -0000	1.3
+++ appendix.tex	16 May 2003 05:37:30 -0000	1.4
@@ -142,3 +142,43 @@
 \caption{Source for stars to demonstrate fill rule}
 \label{fig:stars_source}
 \end{figure}
+
+\begin{figure}[htbp]
+\begin{scriptsize}
+\begin{verbatim}
+void
+draw_spline (XrState *xrs, double height)
+{
+    XrMoveTo (xrs, 0, .1 * height);
+    height = .8 * height;
+    XrRelCurveTo (xrs,
+                  -height/2, height/2,
+                  height/2, height/2,
+                  0, height);
+    XrStroke (xrs);
+}
+
+void
+draw_splines (XrState *xrs,
+              int width, int height)
+{
+    int i;
+    double tolerance[5] = {.1,.5,1,5,10};
+    double line_width = .08 * width;
+    double gap = width / 6;
+
+    XrSetRGBColor (xrs, 0, 0, 0);
+    XrSetLineWidth (xrs, line_width);
+
+    XrTranslate (xrs, gap, 0);
+    for (i=0; i < 5; i++) {
+        XrSetTolerance (xrs, tolerance[i]);
+        draw_spline (xrs, height);
+        XrTranslate (xrs, gap, 0);
+    }
+}
+\end{verbatim}
+\end{scriptsize}
+\caption{Source for splines drawn with varying tolerance}
+\label{fig:splines_tolerance_source}
+\end{figure}

Index: introduction.tex
===================================================================
RCS file: /local/src/CVS/papers/xr_ols2003/introduction.tex,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- introduction.tex	16 May 2003 05:05:52 -0000	1.9
+++ introduction.tex	16 May 2003 05:37:30 -0000	1.10
@@ -22,7 +22,7 @@
 Existing application artwork is often generated in pixel format because the
 rendering operations available to the application at runtime are a mere
 shadow of those provided in a typical image manipulation program.  Providing
-sufficient rendering functionality within the application envioronment
+sufficient rendering functionality within the application environment
 allows artwork to be provided in vector form which presents high quality
 results at a wide range of sizes.
 
@@ -106,7 +106,7 @@
 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
+straightforward.  For example, the lineto operator translates to
+the XrLineTo function.  The coordinates of the line endpoint needed
 by the operator are preceded by the graphics state object in the Xr
 interface.