Decomposition

For devices that wish to get access to a higher level representation of a shading, but do not wish to access the internals of a shading directly, we provide a function to decompose a shading to a mesh.

This is called with functions to `prepare' and `fill' vertices respectively. The mesh is decomposed to triangles internally, each vertex is `prepared' and each triangle `filled' in turn.

The ordering of these calls is not guaranteed, other than the fact that a vertex will always be prepared before it is used as part of a triangle to be filled.


\begin{lstlisting}
typedef struct fz_vertex_s fz_vertex;
\par
struct fz_vertex_s...
..._fn *prepare, fz_shade_process_fn *process, void *process_arg);
\end{lstlisting}

This function is used internally as part of fz_paint_shade, but is intended to also allow extraction of arbitrary shading data.