[PD-cvs] externals/iem/iemgui/src iem_vu.c,1.5,1.6

musil tmusil at users.sourceforge.net
Wed Jan 23 12:42:08 CET 2008


Update of /cvsroot/pure-data/externals/iem/iemgui/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22562/iem/iemgui/src

Modified Files:
	iem_vu.c 
Log Message:
white leds bug fixed

Index: iem_vu.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemgui/src/iem_vu.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** iem_vu.c	9 Nov 2007 14:59:59 -0000	1.5
--- iem_vu.c	23 Jan 2008 11:42:05 -0000	1.6
***************
*** 2,6 ****
  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
  
! iemgui written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
  
  #include "m_pd.h"
--- 2,6 ----
  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
  
! iemgui written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2008 */
  
  #include "m_pd.h"
***************
*** 92,96 ****
      sys_vgui(".x%x.c coords %xRCOVER %d %d %d %d\n",
        glist_getcanvas(glist), x, xpos, ypos1, xpos+x->x_gui.x_w-1,
!       ypos1 + 3*(IEM_VU_STEPS-x->x_rms));
    }
  }
--- 92,96 ----
      sys_vgui(".x%x.c coords %xRCOVER %d %d %d %d\n",
        glist_getcanvas(glist), x, xpos, ypos1, xpos+x->x_gui.x_w-1,
!       ypos1 + 3*(IEM_VU_STEPS-x->x_rms)+1);
    }
  }
***************
*** 131,135 ****
  }
  
! static void iem_vu_change_bkgd_col(t_iem_vu *x)
  {
    int i, j;
--- 131,135 ----
  }
  
! static void iem_vu_change_bkgd_col(t_iem_vu *x, t_glist *glist, int drw_new)
  {
    int i, j;
***************
*** 167,171 ****
    cvec[7] = 0;
    
!   if(glist_isvisible(x->x_gui.x_glist))
    {
      sys_vgui("%xBKGDIMAGE_PROTO put {%s} -to 0 0\n", x, x->x_bkgd_gif_bord);
--- 167,171 ----
    cvec[7] = 0;
    
!   if(glist_isvisible(glist) || drw_new)
    {
      sys_vgui("%xBKGDIMAGE_PROTO put {%s} -to 0 0\n", x, x->x_bkgd_gif_bord);
***************
*** 190,194 ****
      x, 5, 123);
    sys_vgui("%xBKGDIMAGE_PROTO blank\n", x);
!   iem_vu_change_bkgd_col(x);
    
    sys_vgui("image create photo %xBKGDIMAGE -format gif -width %d -height %d\n",
--- 190,194 ----
      x, 5, 123);
    sys_vgui("%xBKGDIMAGE_PROTO blank\n", x);
!   iem_vu_change_bkgd_col(x, glist, 1);
    
    sys_vgui("image create photo %xBKGDIMAGE -format gif -width %d -height %d\n",
***************
*** 211,239 ****
    sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags %xRCOVER\n",
      canvas, xpos, ypos-1, xpos+x->x_gui.x_w-1,
!     ypos-1 + 3*IEM_VU_STEPS, x->x_gui.x_bcol, x->x_gui.x_bcol, x);
!   sys_vgui(".x%x.c create line %d %d %d %d -width %d -fill #%6.6x -tags %xPLED\n",
!     canvas, mid, ypos+10, mid, ypos+10, 2, x->x_gui.x_bcol, x);
!     sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \
!       -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n",
!       canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy,
!       strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"",
!       x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x);
!     if(!x->x_gui.x_fsf.x_snd_able)
!     {
!       sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n",
!         canvas, xpos-1, ypos + x->x_gui.x_h+1,
!         xpos + IOWIDTH-1, ypos + x->x_gui.x_h+2, x, 0);
!       sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n",
!         canvas, xpos+x->x_gui.x_w-IOWIDTH, ypos + x->x_gui.x_h+1,
!         xpos+x->x_gui.x_w, ypos + x->x_gui.x_h+2, x, 1);
!     }
!     if(!x->x_gui.x_fsf.x_rcv_able)
!     {
!       sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n",
!         canvas, xpos-1, ypos-2, xpos + IOWIDTH-1, ypos-1, x, 0);
!       sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n",
!         canvas, xpos+x->x_gui.x_w-IOWIDTH, ypos-2,
!         xpos+x->x_gui.x_w, ypos-1, x, 1);
!     }
  }
  
--- 211,250 ----
    sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags %xRCOVER\n",
      canvas, xpos, ypos-1, xpos+x->x_gui.x_w-1,
!     ypos + 3*(IEM_VU_STEPS-x->x_rms), x->x_gui.x_bcol, x->x_gui.x_bcol, x);
!   
!   if(x->x_peak)
!   {
!     int i=iem_vu_col[x->x_peak];
!     int j=ypos + 3*(IEM_VU_STEPS+1-x->x_peak) - 1;
!     
!     sys_vgui(".x%x.c create line %d %d %d %d -width %d -fill #%6.6x -tags %xPLED\n",
!     canvas, xpos, j, xpos+x->x_gui.x_w, j, 2, my_iemgui_color_hex[i], x);
!   }
!   else
!     sys_vgui(".x%x.c create line %d %d %d %d -width %d -fill #%6.6x -tags %xPLED\n",
!       canvas, mid, ypos+10, mid, ypos+10, 2, x->x_gui.x_bcol, x);
! 
!   sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \
!     -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n",
!     canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy,
!     strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"",
!     x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x);
!   if(!x->x_gui.x_fsf.x_snd_able)
!   {
!     sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n",
!       canvas, xpos-1, ypos + x->x_gui.x_h+1,
!       xpos + IOWIDTH-1, ypos + x->x_gui.x_h+2, x, 0);
!     sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n",
!       canvas, xpos+x->x_gui.x_w-IOWIDTH, ypos + x->x_gui.x_h+1,
!       xpos+x->x_gui.x_w, ypos + x->x_gui.x_h+2, x, 1);
!   }
!   if(!x->x_gui.x_fsf.x_rcv_able)
!   {
!     sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n",
!       canvas, xpos-1, ypos-2, xpos + IOWIDTH-1, ypos-1, x, 0);
!     sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n",
!       canvas, xpos+x->x_gui.x_w-IOWIDTH, ypos-2,
!       xpos+x->x_gui.x_w, ypos-1, x, 1);
!   }
  }
  
***************
*** 313,317 ****
    if(glist_isvisible(glist))
    {
!     iem_vu_change_bkgd_col(x);
      if(x->x_gui.x_w != x->x_old_width)
      {
--- 324,328 ----
    if(glist_isvisible(glist))
    {
!     iem_vu_change_bkgd_col(x, glist, 0);
      if(x->x_gui.x_w != x->x_old_width)
      {





More information about the Pd-cvs mailing list