Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv17236/src

Modified Files:
        TrackArtist.cpp TrackPanel.cpp 
Log Message:
Took border into account in TrackPanel.
Fixed crossover distortion in display on TrackArtist + a few minor changes.

Index: TrackArtist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackArtist.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- TrackArtist.cpp     11 Jul 2006 08:14:13 -0000      1.83
+++ TrackArtist.cpp     29 Aug 2006 23:01:53 -0000      1.84
@@ -477,11 +477,11 @@
         value *= sign;
      }
    }else
-     if(!outer) 
-       if( value >= 0.0)
-        value -= 0.5;
-       else
-        value += 0.5;
+      if(!outer) 
+         if( value >= 0.0)
+            value -= 0.5;
+         else
+            value += 0.5;
 
    if (clip) {
       if (value < min)
@@ -489,10 +489,8 @@
       if (value > max)
          value = max;
    }
-
    value = (max - value) / (max - min);
-
-   return (int) (value * height + sign * 0.5);
+   return (int) (value * (height - 1.0) + 0.5);
 }
 
 // This function isn't used anymore.  Use GetWaveYPosNew instead.
@@ -658,11 +656,11 @@
             dc.DrawLine(r.x + x, r.y + maxtop[x],
                         r.x + x, r.y + maxbot[x]);
             dc.DrawLine(r.x + x, r.y + mintop[x],
-                        r.x + x, r.y + minbot[x]);
+                        r.x + x, r.y + minbot[x] + 1);
          }
          else
             dc.DrawLine(r.x + x, r.y + maxtop[x],
-                        r.x + x, r.y + minbot[x]);
+                        r.x + x, r.y + minbot[x] + 1);
       }
    }
 
@@ -1122,12 +1120,12 @@
    //is spread across r.height.  Draw the line at the proper place.
 
    if(trackmin < 0 && trackmax > 0)
-      {
+   {
          float height = (trackmax/(trackmax-trackmin))*mid.height;
          dc.SetPen(*wxBLACK_PEN);
          dc.DrawLine(mid.x, (int) (mid.y+height), mid.x+mid.width,
                (int) (mid.y+height));
-      }
+   }
 
 
    if (!showIndividualSamples)

Index: TrackPanel.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
retrieving revision 1.324
retrieving revision 1.325
diff -u -d -r1.324 -r1.325
--- TrackPanel.cpp      20 Aug 2006 09:00:54 -0000      1.324
+++ TrackPanel.cpp      29 Aug 2006 23:01:53 -0000      1.325
@@ -551,7 +551,7 @@
    mLabelTrackLabelMenu->Append(OnPasteSelectedTextID, _("Paste"));
 
    mTrackArtist = new TrackArtist();
-   mTrackArtist->SetInset(1, kTopInset + 1, kLeftInset + 2, 1);
+   mTrackArtist->SetInset(1, kTopInset + 1, kLeftInset + 2, 2);
 
    mCapturedTrack = NULL;
    mPopupMenuTarget = NULL;


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to