X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=doc%2Fctsim-appendix.tex;h=2e2aed60b943082c21c49211f16fba8d1700eaf3;hb=82ea0c94394a5a175b260160760155a6686203a1;hp=8be008783bcbff2a06eac34c96317e506a038e21;hpb=47601e0ab94ccdc360824178cf068a05bcbdb0eb;p=ctsim.git diff --git a/doc/ctsim-appendix.tex b/doc/ctsim-appendix.tex index 8be0087..2e2aed6 100644 --- a/doc/ctsim-appendix.tex +++ b/doc/ctsim-appendix.tex @@ -1,47 +1,36 @@ \appendix -\chapter{Simple Graphics Package}\label{appendix}\index{Appendix}% +\chapter{Simple Graphics Package}\label{appendix}\index{Simple Graphics Package} \setheader{{\it Appendix \thechapter}}{}{}{\ctsimheadtitle}{}{{\it Appendix \thechapter}}% \ctsimfooter% - Simple Graphics Package was created in 1980 by Kevin Rosenberg and -is modelled after the graphics library in Foley and van +is modelled after the hypothetical graphics library described by Foley and van Dam\cite{FOLEY82}. It is designed to be platform-independent. \section{Flowchart} -Master coordinate (MC) level \\ -$\hspace{3cm} \downarrow$ \\ -Apply \emph{Current transformation matrix} \\ -$\hspace{3cm} \downarrow$ \\ -World coordinate (WC) level \\ -$\hspace{4cm} \downarrow$ \\ -Clipping against Window \\ -$\hspace{3cm} \downarrow$ \\ -Convert to Normalized device coordinates (NDC) \\ -$\hspace{3cm} \downarrow$ \\ -Clipping against Viewport \\ -$\hspace{3cm} \downarrow$ \\ -Convert to Physical device coordinates (PDC) \\ +\parbox{11cm}{ +\centerline{Master coordinate (MC) level} +\centerline{$\downarrow$} +\centerline{Apply \emph{Current transformation matrix}} +\centerline{$\downarrow$} +\centerline{World coordinate (WC) level} +\centerline{$\downarrow$} +\centerline{Clipping against Window} +\centerline{$\downarrow$} +\centerline{Convert to Normalized device coordinates (NDC)} +\centerline{$\downarrow$} +\centerline{Clipping against Viewport} +\centerline{$\downarrow$} +\centerline{Convert to Physical device coordinates (PDC)} +} \section{Functions}% -\subsection{State functions} -\begin{twocollist} -\twocolitem{\texttt{eraseWindow()}}{Clears the screen} -\twocolitem{\texttt{setColor(color)}}{Set current pen color} -\twocolitem{\texttt{setLinestyle(style)}}{Set current pen style} -\twocolitem{\texttt{setLinewidth(width)}}{Set current pen width} -\twocolitem{\texttt{setTextColor(foreground, background)}}{Set text colors} -\twocolitem{\texttt{setMarker(type, color)}}{Set marker attibutes} -\twocolitem{\texttt{setRasterOp(rasterOp)}}{Set raster operator} -\end{twocollist} - - \subsection{Master coordinate functions} \begin{twocollist} -\twocolitem{setWindow(xmin, ymin, xmax, ymax)}{Set window for world +\twocolitem{\texttt{setWindow(xmin, ymin, xmax, ymax)}}{Set window for world coordinates} \twocolitem{\texttt{moveAbs(x, y)}}{Move graphics cursor to absolute position} \twocolitem{\texttt{moveRel(dx, dy)}}{Move graphics cursor relative to current position} @@ -56,7 +45,7 @@ relative to current position} \twocolitem{\texttt{polylineAbs(x[], y[], n)}}{Draw a series of lines to absolute position} \twocolitem{\texttt{polylineRel(dx[], dy[], n)}}{Draw series of lines relative to current position} \twocolitem{\texttt{drawString(str)}}{Draw text string at current positon} -\twocolitem{\texttt{drawCircle(r}}{Draw circle at current positon} +\twocolitem{\texttt{drawCircle(r)}}{Draw circle at current positon} \twocolitem{\texttt{drawArc(r,start,stop)}}{Draw arc with center at current positon} \twocolitem{\texttt{drawRect(xmin,ymin,xmax,ymax)}}{Draw rectangle} \end{twocollist} @@ -94,6 +83,17 @@ coordinates to NDC} coordinates} \end{twocollist} +\subsection{State functions} +\begin{twocollist} +\twocolitem{\texttt{eraseWindow()}}{Clears the screen} +\twocolitem{\texttt{setColor(color)}}{Set current pen color} +\twocolitem{\texttt{setLinestyle(style)}}{Set current pen style} +\twocolitem{\texttt{setLinewidth(width)}}{Set current pen width} +\twocolitem{\texttt{setTextColor(foreground, background)}}{Set text colors} +\twocolitem{\texttt{setMarker(type, color)}}{Set marker attibutes} +\twocolitem{\texttt{setRasterOp(rasterOp)}}{Set raster operator} +\end{twocollist} + \section{Coordinate Mapping} \subsection{Dimensions} @@ -103,7 +103,7 @@ Physical (Physicial Device Coordinates): $X_{pmax}, Y_{pmax}$\\ \subsection{Formulas} To convert from Master coordinates to World coordinates: \\ -Apply current transformation matrix +\centerline{Apply \emph{current transformation matrix}} To convert from WC to NDC:\\ \begin{equation}