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

Linux Cross Reference
Tina4/src/tools/segment/seg_view.c

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

  1 /**@(#)
  2 **/
  3 #include <tina/sys.h>
  4 #include <tina/sysfuncs.h>
  5 #include <tina/math.h>
  6 #include <tina/mathfuncs.h>
  7 #include <tina/vision.h>
  8 #include <tina/visionfuncs.h>
  9 #include <tina/tv.h>
 10 #include <tina/tvfuncs.h>
 11 #include <tina/draw.h>
 12 #include <tina/drawfuncs.h>
 13 
 14 Imrect *seg_image_get();
 15 List   *seg_es_get();
 16 List   *seg_geom_get();
 17 
 18 /**
 19 graphics options
 20 **/
 21 
 22 static Bool image_on = true;
 23 
 24 void    seg_set_image_on(Bool on)
 25 {
 26     image_on = on;
 27 }
 28 
 29 static Bool es_on = true;
 30 
 31 void    seg_set_es_on(Bool on)
 32 {
 33     es_on = on;
 34 }
 35 
 36 static Bool geom_on = true;
 37 
 38 void    seg_set_geom_on(Bool on)
 39 {
 40     geom_on = on;
 41 }
 42 
 43 void    seg_fulldraw(Tv * tv)
 44 {
 45     List   *es = seg_es_get();
 46     List   *geom = seg_geom_get();
 47 
 48     if (es_on)
 49         tv_string_list(tv, es);
 50     if (geom_on)
 51         reclist_list_draw(tv, geom, (int)NULL, geom_col_draw, NULL);
 52 }
 53 
 54 void    seg_backdraw(Tv * tv)
 55 {
 56     Imrect *im = seg_image_get();
 57 
 58     if (image_on)
 59         tv_imrect2(tv, im);
 60 }
 61 
 62 void    seg_skeldraw(Tv * tv)
 63 {
 64     Imrect *im = seg_image_get();
 65 
 66     tv_imrect_skel(tv, im);
 67 }
 68 
 69 static void seg_init(Tv * tv)
 70 {
 71     Imrect *im = seg_image_get();
 72 
 73     if (im != NULL)
 74         tv_camera2_image(tv, im->width, im->height);
 75 }
 76 
 77 Tv     *seg_tv(void)
 78 {
 79     static Tv *tv = NULL;
 80 
 81     if (tv != NULL)
 82         return (tv);
 83 
 84     tv = tv_create("Segment");
 85     (void) tv_set_fulldraw(tv, seg_fulldraw);
 86     (void) tv_set_backdraw(tv, seg_backdraw);
 87     (void) tv_set_skeldraw(tv, seg_skeldraw);
 88     tv_set_init(tv, seg_init);
 89     (void) tv_set_zoomlevel(tv, IMZOOM);
 90     return (tv);
 91 }
 92 

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