next up previous contents
Next: Drawing Up: The main processus Previous: 1st pass   Contents


2nd pass

The text being parsed, and every formats being read, the last thing to do is to organize the text. This pass is quite simple: it tries to put every !h_Object! in "screen lines". So this pass creates a new table of !h_Scrlines!, stored in the !hTxt! structure too.


\begin{lstlisting}
typedef struct {
unsigned short pos_txt;
unsigned char nb_s...
...th;
unsigned char exp_max;
unsigned char height;
} h_ScrLine;
\end{lstlisting}

Each screen line is defined by a position in the text. To draw more quickly, some graphical information are kept in the structure: !width!, !nb_space!...

Note that a !h_ScrLine! can start in a middle of an !h_Object!. The only example is if the !h_Object! is a !HOBJECT_TEXT!. For very long text without format changing, the !pos_txt! of a !h_ScrLine! can point in the middle of the !h_Object!.



2006-02-19