Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv19446
Modified Files:
TrackArtist.cpp
Log Message:
Display zero-line on Mac
Index: TrackArtist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackArtist.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- TrackArtist.cpp 28 Jul 2007 04:19:26 -0000 1.99
+++ TrackArtist.cpp 6 Aug 2007 05:36:40 -0000 1.100
@@ -620,12 +620,19 @@
for(x=0; x<r.width; x++)
sel[x] = (ssel0 <= where[x] && where[x + 1] < ssel1);
+ int mid = (int) ((zoomMax/(zoomMax-zoomMin))*r.height);
+
GetColour(blankPen, &r0, &g0, &b0);
GetColour(unselectedPen, &r1, &g1, &b1);
GetColour(selectedPen, &r2, &g2, &b2);
for(y=0; y<r.height; y++) {
for(x=0; x<r.width; x++) {
- if (y < maxtop[x] || y > minbot[x] ||
+ if (y == mid) {
+ *imageBuffer++ = 0;
+ *imageBuffer++ = 0;
+ *imageBuffer++ = 0;
+ }
+ else if (y < maxtop[x] || y > minbot[x] ||
(y > mintop[x] && y < maxbot[x])) {
*imageBuffer++ = r0;
*imageBuffer++ = g0;
@@ -1118,20 +1125,17 @@
DrawWaveformBackground(dc, drawRect, imageBuffer, where, ssel0, ssel1,
envValues, zoomMin, zoomMax, dB, drawEnvelope);
- float trackmin, trackmax;
- track->GetDisplayBounds(&trackmin, &trackmax);
-
//OK, the display bounds are between min and max, which
//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 !BUFFERED_DRAWING
+ if (zoomMin < 0 && zoomMax > 0) {
+ float height = (zoomMax/(zoomMax-zoomMin))*mid.height;
+ dc.SetPen(*wxBLACK_PEN);
+ dc.DrawLine(mid.x, (int) (mid.y+height), mid.x+mid.width,
+ (int) (mid.y+height));
}
-
+ #endif
if (!showIndividualSamples)
DrawMinMaxRMS(dc, drawRect, imageBuffer, zoomMin, zoomMax,
|