~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/draw/paint/state_draw.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2 **/
  3 #include <tina/sys.h>
  4 #include <tina/math.h>
  5 #include <tina/mathfuncs.h>
  6 #include <tina/vision.h>
  7 #include <tina/tv.h>
  8 #include <tina/tvfuncs.h>
  9 #include <tina/draw.h>
 10 #include <tina/drawfuncs.h>
 11 
 12 void    state_draw_one(Tv * tv, State * state, int i)
 13 {
 14     int     type;
 15     void   *geom;
 16 
 17     if (state == NULL)
 18         return;
 19 
 20     type = vector_get(state->type, i);
 21     geom = (void *) vector_getp(state->geom, i);
 22     if (type != (int)NULL)
 23         geom_draw(tv, geom, type);
 24 }
 25 
 26 void    state_draw(Tv * tv, State * state)
 27 {
 28     int     i;
 29     int     maxindex;
 30     int    *type;
 31     void  **geom;
 32 
 33     if (state == NULL)
 34         return;
 35 
 36     maxindex = state->maxindex;
 37     type = (int *) state->type->data;
 38     geom = (void **) state->geom->data;
 39     tv_save_draw(tv);
 40 
 41     for (i = 0; i < maxindex; i++)
 42         if (type[i] != (int)NULL)
 43             geom_col_draw(tv, geom[i], type[i]);
 44     tv_reset_draw(tv);
 45 }
 46 
 47 void    state_skel_draw(Tv * tv, State * state)
 48 {
 49     int     i;
 50     int     maxindex;
 51     int    *type;
 52     void  **geom;
 53 
 54     if (state == NULL)
 55         return;
 56 
 57     maxindex = state->maxindex;
 58     type = (int *) state->type->data;
 59     geom = (void **) state->geom->data;
 60 
 61     for (i = 0; i < MIN(maxindex, 50); i++)
 62         if (type[i] == LINE3)
 63             geom_draw(tv, geom[i], type[i]);
 64 }
 65 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.