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

Linux Cross Reference
Tina5/tina-libs/deprecated/tina5/draw/drawPaint_state.c

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

  1 /**********
  2  *
  3  * This file is part of the TINA Open Source Image Analysis Environment
  4  * henceforth known as TINA
  5  *
  6  * TINA is free software; you can redistribute it and/or modify
  7  * it under the terms of the GNU Lesser General Public License as
  8  * published by the Free Software Foundation.
  9  *
 10  * TINA is distributed in the hope that it will be useful,
 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  * GNU Lesser General Public License for more details.
 14  *
 15  * You should have received a copy of the GNU Lesser General Public License
 16  * along with TINA; if not, write to the Free Software Foundation, Inc.,
 17  * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 18  *
 19  **********
 20  *
 21  * Program :    TINA
 22  * File    :  $Source: /home/tina/cvs/tina-libs/deprecated/tina5/draw/drawPaint_state.c,v $
 23  * Date    :  $Date: 2002/12/09 11:51:23 $
 24  * Version :  $Revision: 1.1.1.1 $
 25  * CVS Id  :  $Id: drawPaint_state.c,v 1.1.1.1 2002/12/09 11:51:23 cvstina Exp $
 26  *
 27  * Author  : Legacy TINA
 28  *
 29  * Notes :
 30  *
 31  *********
 32 */
 33 
 34 #include "drawPaint_state.h"
 35 
 36 #if HAVE_CONFIG_H
 37   #include <config.h>
 38 #endif
 39 
 40 #include <tina/sys/sysDef.h>
 41 #include <tina/math/mathDef.h>
 42 #include <tina/math/mathPro.h>
 43 #include <tina/geometry/geomDef.h>
 44 #include <tina/draw/draw_tvDef.h>
 45 #include <tina/draw/draw_tvPro.h>
 46 #include <tina/draw/draw_paintDef.h>
 47 #include <tina/draw/draw_paintPro.h>
 48 
 49 void    state_draw_one(Tv * tv, State * state, int i)
 50 {
 51     int     type;
 52     void   *geom;
 53 
 54     if (state == NULL)
 55         return;
 56 
 57     type = vector_get(state->type, i);
 58     geom = (void *) vector_getp(state->geom, i);
 59     if (type != (int)NULL)
 60         geom_draw(tv, geom, type);
 61 }
 62 
 63 void    state_draw(Tv * tv, State * state)
 64 {
 65     int     i;
 66     int     maxindex;
 67     int    *type;
 68     void  **geom;
 69 
 70     if (state == NULL)
 71         return;
 72 
 73     maxindex = state->maxindex;
 74     type = (int *) state->type->data;
 75     geom = (void **) state->geom->data;
 76     tv_save_draw(tv);
 77 
 78     for (i = 0; i < maxindex; i++)
 79         if (type[i] != (int)NULL)
 80             geom_col_draw(tv, geom[i], type[i]);
 81     tv_reset_draw(tv);
 82 }
 83 
 84 void    state_skel_draw(Tv * tv, State * state)
 85 {
 86     int     i;
 87     int     maxindex;
 88     int    *type;
 89     void  **geom;
 90 
 91     if (state == NULL)
 92         return;
 93 
 94     maxindex = state->maxindex;
 95     type = (int *) state->type->data;
 96     geom = (void **) state->geom->data;
 97 
 98     for (i = 0; i < MIN(maxindex, 50); i++)
 99         if (type[i] == LINE3)
100             geom_draw(tv, geom[i], type[i]);
101 }
102 

~ [ 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.