Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6545
Modified Files:
AColor.cpp AColor.h Envelope.cpp Envelope.h FreqWindow.cpp
LabelTrack.cpp LabelTrack.h NoteTrack.cpp Printing.cpp
TimeTrack.cpp TimeTrack.h TrackArtist.cpp TrackArtist.h
TrackPanel.cpp TrackPanel.h
Log Message:
Converted all wxDC::DrawLine()s to AColor::Line()s so that it can handle
the line drawing differences among platforms.
Hopefully fixed all 1-off drawing issues that creaped in due to the platform
differences. Everyone should keep an extra critical eye open for stray
pixels or lines that seem to be longer at one of the ends.
Reworked much of the waveform drawing code in TrackArtist to improve
performance.
Due to the performance gains in TrackArtist, the Mac specific waveform
drawing code was removed since it was out of sync with the other platforms.
Fixed drawing and click detection within NoteTrack label area.
Index: Envelope.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Envelope.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- Envelope.cpp 4 May 2009 23:32:48 -0000 1.65
+++ Envelope.cpp 16 May 2009 11:13:12 -0000 1.66
@@ -158,22 +158,15 @@
return pow(10.0, ((fabs(value) * envdBRange) - envdBRange) / 20.0)*sign;;
}
-void DrawPoint(wxDC & dc, wxRect & r, int x, int y, bool top, bool contour)
+void DrawPoint(wxDC & dc, const wxRect & r, int x, int y, bool top)
{
if (y >= 0 && y <= r.height) {
- if(contour){
- wxRect circle(r.x + x - 2, r.y + y - 2,
- 4, 4);
- dc.DrawEllipse(circle);
- }else{
- wxRect circle(r.x + x - 2, r.y + (top? y-1: y-4),
- 4, 4);
- dc.DrawEllipse(circle);
- }
+ wxRect circle(r.x + x, r.y + (top ? y - 1: y - 2), 4, 4);
+ dc.DrawEllipse(circle);
}
}
-void Envelope::Draw(wxDC & dc, wxRect & r, double h, double pps, bool dB,
+void Envelope::Draw(wxDC & dc, const wxRect & r, double h, double pps, bool dB,
float zoomMin, float zoomMax)
{
h -= mOffset;
@@ -193,25 +186,36 @@
double v = mEnv[i]->val;
int x = int ((mEnv[i]->t - h) * pps);
- int y,y2;
+ int y, y2;
y = GetWaveYPos(v, zoomMin, zoomMax, r.height, dB,
true, dBr, false);
- DrawPoint(dc, r, x, y, true, false);
-
- if (mMirror) {
+ if (!mMirror) {
+ DrawPoint(dc, r, x, y, true);
+ }
+ else {
y2 = GetWaveYPos(-v-.000000001, zoomMin, zoomMax, r.height, dB,
true, dBr, false);
- DrawPoint(dc, r, x, y2, false, false);
+
+ // This follows the same logic as the envelop drawing in
+ // TrackArtist::DrawEnvelope().
+ if (y2 - y < 9) {
+ int value = (int)((zoomMax / (zoomMax - zoomMin)) * r.height);
+ y = value - 4;
+ y2 = value + 4;
+ }
+
+ DrawPoint(dc, r, x, y, true);
+ DrawPoint(dc, r, x, y2, false);
// Contour
y = GetWaveYPos(v, zoomMin, zoomMax, r.height, dB,
false, dBr, false);
y2 = GetWaveYPos(-v-.000000001, zoomMin, zoomMax, r.height, dB,
false, dBr, false);
- if(y<=y2){
- DrawPoint(dc, r, x, y, true, true);
- DrawPoint(dc, r, x, y2, false, true);
+ if (y <= y2) {
+ DrawPoint(dc, r, x, y, true);
+ DrawPoint(dc, r, x, y2, false);
}
}
@@ -965,11 +969,11 @@
}
// 'X' is in pixels and relative to track.
-double Envelope::GetValueAtX( int x, wxRect & r, double h, double pps )
+double Envelope::GetValueAtX(int x, const wxRect & r, double h, double pps)
{
// Convert x to time.
double t = (x - r.x) / pps + h ;//-mOffset;
- return GetValue( t );
+ return GetValue(t);
}
Index: Printing.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Printing.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Printing.cpp 13 Jul 2008 22:58:08 -0000 1.6
+++ Printing.cpp 16 May 2009 11:13:12 -0000 1.7
@@ -23,6 +23,7 @@
#include <wx/print.h>
#include <wx/printdlg.h>
+#include "AColor.h"
#include "Track.h"
#include "TrackArtist.h"
#include "ViewInfo.h"
@@ -96,43 +97,10 @@
r.width = width;
r.height = (int)(n->GetHeight() * scale);
- switch(n->GetKind()) {
- case Track::Wave:
- switch (((WaveTrack *)n)->GetDisplay()) {
- case WaveTrack::WaveformDisplay:
- artist.DrawWaveform((WaveTrack *)n, *dc, r,
- &viewInfo, false, false, false, false, false);
- break;
- case WaveTrack::WaveformDBDisplay:
- artist.DrawWaveform((WaveTrack *)n, *dc, r,
- &viewInfo, false, false, false, true, false);
- break;
- case WaveTrack::SpectrumDisplay:
- artist.DrawSpectrum((WaveTrack *)n, *dc, r, &viewInfo, false,
false);
- break;
- case WaveTrack::SpectrumLogDisplay:
- artist.DrawSpectrum((WaveTrack *)n, *dc, r, &viewInfo, false,
true);
- break;
- case WaveTrack::PitchDisplay:
- artist.DrawSpectrum((WaveTrack *)n, *dc, r, &viewInfo, true,
false);
- break;
- }
- break;
-#ifdef USE_MIDI
- case Track::Note:
- artist.DrawNoteTrack((NoteTrack *)n, *dc, r, &viewInfo);
- break;
-#endif // USE_MIDI
- case Track::Label:
- artist.DrawLabelTrack((LabelTrack *)n, *dc, r, &viewInfo);
- break;
- case Track::Time:
- artist.DrawTimeTrack((TimeTrack *)n, *dc, r, &viewInfo);
- break;
- }
+ artist.DrawTrack(n, *dc, r, &viewInfo, false, false, false, false);
dc->SetPen(*wxBLACK_PEN);
- dc->DrawLine(0, r.y, width, r.y);
+ AColor::Line(*dc, 0, r.y, width, r.y);
n = iter.Next();
y += r.height;
Index: Envelope.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Envelope.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- Envelope.h 4 May 2009 23:32:48 -0000 1.33
+++ Envelope.h 16 May 2009 11:13:12 -0000 1.34
@@ -95,7 +95,7 @@
// Event Handlers
- void Draw(wxDC & dc, wxRect & r, double h, double pps, bool dB,
+ void Draw(wxDC & dc, const wxRect & r, double h, double pps, bool dB,
float zoomMin=-1.0, float zoomMax=1.0);
// Each ofthese returns true if parents needs to be redrawn
@@ -134,7 +134,7 @@
/** \brief Get envelope value at time t */
double GetValue(double t) const;
/** \brief Get envelope value at pixel X */
- double GetValueAtX( int x, wxRect & r, double h, double pps);
+ double GetValueAtX(int x, const wxRect & r, double h, double pps);
/** \brief Get many envelope points at once.
*
Index: TrackPanel.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.h,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- TrackPanel.h 5 Apr 2009 22:34:00 -0000 1.135
+++ TrackPanel.h 16 May 2009 11:13:12 -0000 1.136
@@ -92,13 +92,14 @@
void MakeMoreSliders();
void EnsureSufficientSliders(int index);
+ void SetTrackInfoFont(wxDC *dc);
void DrawBackground(wxDC * dc, const wxRect r, bool bSelected, bool
bHasMuteSolo, const int labelw, const int vrul);
void DrawBordersWithin(wxDC * dc, const wxRect r, bool bHasMuteSolo );
void DrawCloseBox(wxDC * dc, const wxRect r, bool down);
void DrawTitleBar(wxDC * dc, const wxRect r, Track * t, bool down);
void DrawMuteSolo(wxDC * dc, const wxRect r, Track * t, bool down, bool
solo, bool bHasSoloButton);
void DrawVRuler(wxDC * dc, const wxRect r, Track * t);
- void DrawSliders(wxDC *dc, WaveTrack *t, wxRect r);
+ void DrawSliders(wxDC * dc, WaveTrack *t, wxRect r);
void DrawMinimize(wxDC * dc, const wxRect r, Track * t, bool down, bool
minimized);
void GetTrackControlsRect(const wxRect r, wxRect &dest) const;
@@ -113,6 +114,7 @@
LWSliderArray mGains;
LWSliderArray mPans;
wxWindow * pParent;
+ wxFont mFont;
friend class TrackPanel;
};
Index: TimeTrack.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TimeTrack.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- TimeTrack.h 23 Sep 2006 02:28:05 -0000 1.6
+++ TimeTrack.h 16 May 2009 11:13:12 -0000 1.7
@@ -40,7 +40,7 @@
virtual double GetStartTime() { return 0.0; };
virtual double GetEndTime() { return 0.0; };
- void Draw(wxDC & dc, wxRect & r, double h, double pps);
+ void Draw(wxDC & dc, const wxRect & r, double h, double pps);
// XMLTagHandler callback methods for loading and saving
Index: LabelTrack.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LabelTrack.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- LabelTrack.h 30 Mar 2009 06:16:48 -0000 1.45
+++ LabelTrack.h 16 May 2009 11:13:12 -0000 1.46
@@ -40,10 +40,10 @@
{
public:
LabelStruct();
- void DrawLines( wxDC & dc, wxRect & r);
- void DrawGlyphs( wxDC & dc, wxRect & r, int GlyphLeft, int GlyphRight);
- void DrawText( wxDC & dc, wxRect & r);
- void DrawTextBox( wxDC & dc, wxRect & r);
+ void DrawLines( wxDC & dc, const wxRect & r);
+ void DrawGlyphs( wxDC & dc, const wxRect & r, int GlyphLeft, int
GlyphRight);
+ void DrawText( wxDC & dc, const wxRect & r);
+ void DrawTextBox( wxDC & dc, const wxRect & r);
void DrawHighlight( wxDC & dc, int xPos1, int xPos2, int charHeight);
void getXPos( wxDC & dc, int * xPos1, int cursorPos);
@@ -88,7 +88,7 @@
static void ResetFont();
- void Draw(wxDC & dc, wxRect & r, double h, double pps,
+ void Draw(wxDC & dc, const wxRect & r, double h, double pps,
double sel0, double sel1);
int getSelectedIndex() const { return mSelIndex; }
@@ -210,8 +210,8 @@
// Used only for a LabelTrack on the clipboard
double mClipLen;
- void ComputeLayout(wxRect & r, double h, double pps);
- void ComputeTextPosition(wxRect & r, int index);
+ void ComputeLayout(const wxRect & r, double h, double pps);
+ void ComputeTextPosition(const wxRect & r, int index);
void SetCurrentCursorPosition(wxDC & dc, int xPos);
void calculateFontHeight(wxDC & dc);
Index: TrackArtist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackArtist.cpp,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- TrackArtist.cpp 20 Apr 2009 18:32:17 -0000 1.147
+++ TrackArtist.cpp 16 May 2009 11:13:12 -0000 1.148
@@ -69,10 +69,6 @@
int gWaveformTimeCount = 0;
#endif
-#ifdef __WXMAC__
-#define BUFFERED_DRAWING 1
-#endif
-
#ifdef USE_MIDI
const int octaveHeight = 62;
const int blackPos[5] = { 6, 16, 32, 42, 52 };
@@ -152,7 +148,6 @@
[...1605 lines suppressed...]
- wxDC & dc, wxRect & r,
- ViewInfo * viewInfo)
+ wxDC & dc,
+ const wxRect & r,
+ const ViewInfo *viewInfo)
{
double sel0 = viewInfo->sel0;
double sel1 = viewInfo->sel1;
@@ -2703,8 +2524,9 @@
}
void TrackArtist::DrawTimeTrack(TimeTrack *track,
- wxDC & dc, wxRect & r,
- ViewInfo * viewInfo)
+ wxDC & dc,
+ const wxRect & r,
+ const ViewInfo *viewInfo)
{
track->Draw(dc, r, viewInfo->h, viewInfo->zoom);
wxRect envRect = r;
Index: FreqWindow.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/FreqWindow.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- FreqWindow.cpp 19 Apr 2009 23:35:47 -0000 1.72
+++ FreqWindow.cpp 16 May 2009 11:13:12 -0000 1.73
@@ -591,7 +591,7 @@
lineheight = r.height - 2;
if (ynorm > 0.0)
- memDC.DrawLine(r.x + 1 + i, r.y + r.height - 1 - lineheight,
+ AColor::Line(memDC, r.x + 1 + i, r.y + r.height - 1 - lineheight,
r.x + 1 + i, r.y + r.height - 1);
if (mLogAxis)
@@ -869,7 +869,7 @@
px = int ((bestpeak - xMin) * width / (xMax - xMin));
dc.SetPen(wxPen(wxColour(160,160,160), 1, wxSOLID));
- dc.DrawLine(r.x + 1 + px, r.y, r.x + 1 + px, r.y + r.height);
+ AColor::Line(dc, r.x + 1 + px, r.y, r.x + 1 + px, r.y + r.height);
// print out info about the cursor location
Index: AColor.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AColor.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- AColor.cpp 26 Mar 2009 23:45:31 -0000 1.30
+++ AColor.cpp 16 May 2009 11:13:12 -0000 1.31
@@ -67,6 +67,80 @@
wxPen AColor::sparePen;
wxBrush AColor::spareBrush;
+//
+// Draw an upward or downward pointing arrow.
+//
+void AColor::Arrow(wxDC & dc, wxCoord x, wxCoord y, int width, bool down)
+{
+ if (width & 0x01) {
+ width--;
+ }
+
+ wxPoint pt[3];
+ int half = width / 2;
+
+ if (down) {
+ pt[0].x = 0; pt[0].y = 0;
+ pt[1].x = width; pt[1].y = 0;
+ pt[2].x = half; pt[2].y = half;
+ }
+ else {
+ pt[0].x = 0; pt[0].y = half;
+ pt[1].x = half; pt[1].y = 0;
+ pt[2].x = width; pt[2].y = half;
+ }
+
+ dc.DrawPolygon(3, pt, x, y);
+}
+
+//
+// Draw a line while accounting for differences in wxWidgets versions
+//
+void AColor::Line(wxDC & dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
+{
+ // As of 2.8.9 (possibly earlier), wxDC::DrawLine() on the Mac draws the
+ // last point since it is now based on the new wxGraphicsContext system.
+ // Make the other platforms do the same thing since the other platforms
+ // "may" follow they get wxGraphicsContext going.
+#if defined(__WXMAC__)
+ dc.DrawLine(x1, y1, x2, y2);
+#else
+ bool point = false;
+
+ if (x1 == x2) {
+ if (y1 < y2) {
+ y2++;
+ }
+ else if (y2 < y1) {
+ y1++;
+ }
+ else {
+ point = true;
+ }
+ }
+ else if (y1 == y2) {
+ if (x1 < x2) {
+ x2++;
+ }
+ else if (x2 < x1) {
+ x1++;
+ }
+ else {
+ point = true;
+ }
+ }
+ else {
+ dc.DrawPoint(x2, y2);
+ }
+
+ if (point) {
+ dc.DrawPoint(x2, y2);
+ }
+ else {
+ dc.DrawLine(x1, y1, x2, y2);
+ }
+#endif
+}
//
// Draws a focus rectangle (Taken directly from wxWidgets source)
@@ -113,16 +187,16 @@
else
AColor::Dark(&dc, false);
- dc.DrawLine(r.x, r.y, r.x + r.width, r.y);
- dc.DrawLine(r.x, r.y, r.x, r.y + r.height);
+ AColor::Line(dc, r.x, r.y, r.x + r.width, r.y);
+ AColor::Line(dc, r.x, r.y, r.x, r.y + r.height);
if (!up)
AColor::Light(&dc, false);
else
AColor::Dark(&dc, false);
- dc.DrawLine(r.x + r.width, r.y, r.x + r.width, r.y + r.height);
- dc.DrawLine(r.x, r.y + r.height, r.x + r.width, r.y + r.height);
+ AColor::Line(dc, r.x + r.width, r.y, r.x + r.width, r.y + r.height);
+ AColor::Line(dc, r.x, r.y + r.height, r.x + r.width, r.y + r.height);
}
wxColour AColor::Blend( const wxColour & c1, const wxColour & c2 )
Index: AColor.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AColor.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- AColor.h 13 Mar 2009 00:43:57 -0000 1.16
+++ AColor.h 16 May 2009 11:13:12 -0000 1.17
@@ -25,6 +25,8 @@
static void Init();
static void ReInit();
+ static void Arrow(wxDC & dc, wxCoord x, wxCoord y, int width, bool down =
true);
+ static void Line(wxDC & dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
static void DrawFocus(wxDC & dc, wxRect & r);
static void Bevel(wxDC & dc, bool up, wxRect & r);
static void BevelTrackInfo(wxDC & dc, bool up, wxRect & r);
Index: LabelTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LabelTrack.cpp,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- LabelTrack.cpp 7 Apr 2009 05:09:07 -0000 1.102
+++ LabelTrack.cpp 16 May 2009 11:13:12 -0000 1.103
@@ -244,7 +244,7 @@
/// take priority over the ones earlier, so because centering
/// is the first thing we do, it's the first thing we lose if
/// we can't do everything we want to.
-void LabelTrack::ComputeTextPosition(wxRect & r, int index)
+void LabelTrack::ComputeTextPosition(const wxRect & r, int index)
{
// xExtra is extra space
// between the text and the endpoints.
@@ -386,7 +386,7 @@
/// ComputeLayout determines which row each label
/// should be placed on, and reserves space for it.
/// Function assumes that the labels are sorted.
-void LabelTrack::ComputeLayout( wxRect & r, double h, double pps)
+void LabelTrack::ComputeLayout(const wxRect & r, double h, double pps)
{
int i;
int iRow;
@@ -459,7 +459,7 @@
/// of the start or end of a label.
/// @param dc the device context
/// @param r the LabelTrack rectangle.
-void LabelStruct::DrawLines( wxDC & dc, wxRect & r)
+void LabelStruct::DrawLines(wxDC & dc, const wxRect & r)
{
// How far out from the centre line should the vertical lines
// start, i.e. what is the y position of the icon?
@@ -475,21 +475,21 @@
if((x >= r.x) && (x <= (r.x+r.width)))
{
// Draw line above and below left dragging widget.
- dc.DrawLine(x, r.y, x, yIconStart);
- dc.DrawLine(x, yIconEnd, x, r.y + r.height);
+ AColor::Line(dc, x, r.y, x, yIconStart - 1);
+ AColor::Line(dc, x, yIconEnd, x, r.y + r.height);
}
if((x1 >= r.x) && (x1 <= (r.x+r.width)))
{
// Draw line above and below right dragging widget.
- dc.DrawLine(x1, r.y, x1, yIconStart);
- dc.DrawLine(x1, yIconEnd, x1, r.y + r.height);
+ AColor::Line(dc, x1, r.y, x1, yIconStart - 1);
+ AColor::Line(dc, x1, yIconEnd, x1, r.y + r.height);
}
}
/// DrawGlyphs draws the wxIcons at the start and end of a label.
/// @param dc the device context
/// @param r the LabelTrack rectangle.
-void LabelStruct::DrawGlyphs( wxDC & dc, wxRect & r, int GlyphLeft, int
GlyphRight)
+void LabelStruct::DrawGlyphs(wxDC & dc, const wxRect & r, int GlyphLeft, int
GlyphRight)
{
if (y<0)
return;
@@ -510,7 +510,7 @@
/// behind the text itself.
/// @param dc the device context
/// @param r the LabelTrack rectangle.
-void LabelStruct::DrawText( wxDC & dc, wxRect & r)
+void LabelStruct::DrawText(wxDC & dc, const wxRect & r)
{
if (y<0)
return;
@@ -532,7 +532,7 @@
}
}
-void LabelStruct::DrawTextBox( wxDC & dc, wxRect & r)
+void LabelStruct::DrawTextBox(wxDC & dc, const wxRect & r)
{
if (y<0)
return;
@@ -629,7 +629,7 @@
/// Draw calls other functions to draw the LabelTrack.
/// @param dc the device context
/// @param r the LabelTrack rectangle.
-void LabelTrack::Draw(wxDC & dc, wxRect & r, double h, double pps,
+void LabelTrack::Draw(wxDC & dc, const wxRect & r, double h, double pps,
double sel0, double sel1)
{
if(msFont.Ok())
@@ -794,7 +794,9 @@
const int CursorWidth=2;
if (mDrawCursor) {
currentPen.SetWidth(CursorWidth);
- dc.DrawLine(xPos-1, mLabels[i]->y - mFontHeight/2 + 1, xPos-1,
mLabels[i]->y + mFontHeight/2);
+ AColor::Line(dc,
+ xPos-1, mLabels[i]->y - mFontHeight/2 + 1,
+ xPos-1, mLabels[i]->y + mFontHeight/2 - 1);
currentPen.SetWidth(1);
}
}
Index: TrackPanel.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
retrieving revision 1.448
retrieving revision 1.449
diff -u -d -r1.448 -r1.449
--- TrackPanel.cpp 26 Apr 2009 18:37:11 -0000 1.448
+++ TrackPanel.cpp 16 May 2009 11:13:12 -0000 1.449
@@ -260,18 +260,6 @@
clippee = val;
}
-/// \todo Probably should move to 'Utils.cpp'.
-void SetTrackInfoFont(wxDC * dc)
-{
- int fontSize = 10;
-#if defined __WXMSW__ || __WXGTK__
- fontSize = 8;
-#endif
-
- wxFont labelFont(fontSize, wxSWISS, wxNORMAL, wxNORMAL);
- dc->SetFont(labelFont);
-}
-
enum {
TrackPanelFirstID = 2000,
OnSetNameID,
@@ -1040,10 +1028,11 @@
int y = t->GetY() - mViewInfo->vpos;
// Draw the new indicator in its new location
- dc.DrawLine( x,
+ AColor::Line(dc,
+ x,
y + kTopInset + 1,
x,
- y + t->GetHeight() - 2 );
+ y + t->GetHeight() - 3 );
}
mRuler->DrawIndicator( pos, rec );
@@ -1111,11 +1100,11 @@
TimeTrack *tt = (TimeTrack *) t;
double t0 = tt->warp( mLastCursor - mViewInfo->h );
int warpedX = GetLeftOffset() + int ( t0 * mViewInfo->zoom );
- dc.DrawLine( warpedX, top, warpedX, bottom );
+ AColor::Line( dc, warpedX, top, warpedX, bottom );
}
else
{
- dc.DrawLine( x, top, x, bottom ); // <-- The whole point of this
routine.
+ AColor::Line( dc, x, top, x, bottom ); // <-- The whole point of
this routine.
}
}
}
@@ -1211,7 +1200,8 @@
#if DEBUG_DRAW_TIMING
sw.Pause();
- wxLogDebug(wxT("Total: %d milliseconds"), sw.Time() );
+ wxLogDebug(wxT("Total: %d milliseconds"), sw.Time());
+ wxPrintf(wxT("Total: %d milliseconds\n"), sw.Time());
#endif
}
@@ -3540,8 +3530,13 @@
void TrackPanel::HandleLabelClick(wxMouseEvent & event)
{
// AS: If not a click, ignore the mouse event.
- if (!(event.LeftDown() || event.LeftDClick()))
+ if (!event.ButtonDown() && !event.ButtonDClick()) {
return;
+ }
+
+ // MIDI tracks use the right mouse button, but other tracks get confused
+ // if they see anything other than a left click.
+ bool isleft = event.Button(wxMOUSE_BTN_LEFT);
AudacityProject *p = GetProject();
bool unsafe = (p->GetAudioIOToken()>0 &&
@@ -3560,19 +3555,19 @@
}
// LL: Check close box
- if (CloseFunc(t, r, event.m_x, event.m_y))
+ if (isleft && CloseFunc(t, r, event.m_x, event.m_y))
return;
// LL: Check title bar for popup
- if (PopupFunc(t, r, event.m_x, event.m_y))
+ if (isleft &&PopupFunc(t, r, event.m_x, event.m_y))
return;
// MM: Check minimize buttons on WaveTracks. Must be before
// solo/mute buttons, sliders etc.
- if (MinimizeFunc(t, r, event.m_x, event.m_y))
+ if (isleft && MinimizeFunc(t, r, event.m_x, event.m_y))
return;
- if (t->GetKind() == Track::Wave)
+ if (isleft && t->GetKind() == Track::Wave)
{
// DM: Check Mute and Solo buttons on WaveTracks:
if (MuteSoloFunc(t, r, event.m_x, event.m_y, false) ||
@@ -3593,14 +3588,17 @@
mTrackInfo.GetTrackControlsRect(r, midiRect);
if (midiRect.Contains(event.m_x, event.m_y)) {
((NoteTrack *) t)->LabelClick(midiRect, event.m_x, event.m_y,
- event.RightDown()
- || event.RightDClick());
+ event.Button(wxMOUSE_BTN_RIGHT));
Refresh(false);
return;
}
}
#endif // USE_MIDI
+ if (!isleft) {
+ return;
+ }
+
// DM: If they weren't clicking on a particular part of a track label,
// deselect other tracks and select this one.
@@ -4844,9 +4842,9 @@
// changed. An example is during recording.
#if DEBUG_DRAW_TIMING
- wxRect rbox = region.GetBox();
- wxPrintf(wxT("Update Region: %d %d %d %d\n"),
- rbox.x, rbox.y, rbox.width, rbox.height);
+// wxRect rbox = region.GetBox();
+// wxPrintf(wxT("Update Region: %d %d %d %d\n"),
+// rbox.x, rbox.y, rbox.width, rbox.height);
#endif
if (region.Contains(0, 0, GetLeftOffset(), trackRect.height)) {
@@ -4882,10 +4880,10 @@
if (mSnapManager && (mSnapLeft >= 0 || mSnapRight >= 0)) {
AColor::SnapGuidePen(dc);
if (mSnapLeft >= 0) {
- dc->DrawLine((int)mSnapLeft, 0, mSnapLeft, 30000);
+ AColor::Line(*dc, (int)mSnapLeft, 0, mSnapLeft, 30000);
}
if (mSnapRight >= 0) {
- dc->DrawLine((int)mSnapRight, 0, mSnapRight, 30000);
+ AColor::Line(*dc, (int)mSnapRight, 0, mSnapRight, 30000);
}
}
}
@@ -4935,7 +4933,7 @@
r.width -= kLeftInset * 2;
r.height -= kTopInset;
- SetTrackInfoFont(dc);
+ mTrackInfo.SetTrackInfoFont(dc);
dc->SetTextForeground(theTheme.Colour(clrTrackPanelText));
bool bIsWave = (t->GetKind() == Track::Wave);
@@ -6123,14 +6121,14 @@
dc->SetPen(*wxBLACK_PEN);
dc->DrawRectangle(r.x, r.y, r.width - 1, r.height - 1);
- dc->DrawLine(labelw, r.y, labelw, r.y + r.height - 1); // between
vruler and TrackInfo
+ AColor::Line(*dc, labelw, r.y, labelw, r.y + r.height - 1); //
between vruler and TrackInfo
// The lines at bottom of 1st track and top of second track of stereo group
// Possibly replace with DrawRectangle to add left border.
if (t->GetLinked()) {
int h1 = r.y + t->GetHeight() - kTopInset;
- dc->DrawLine(vrul, h1 - 2, r.x + r.width - 1, h1 - 2);
- dc->DrawLine(vrul, h1 + kTopInset, r.x + r.width - 1, h1 + kTopInset);
+ AColor::Line(*dc, vrul, h1 - 2, r.x + r.width - 1, h1 - 2);
+ AColor::Line(*dc, vrul, h1 + kTopInset, r.x + r.width - 1, h1 +
kTopInset);
}
}
@@ -6143,17 +6141,17 @@
dc->SetPen(*wxBLACK_PEN);
// bottom
- dc->DrawLine(r.x, bottom, right, bottom);
+ AColor::Line(*dc, r.x, bottom, right, bottom);
// right
- dc->DrawLine(right, r.y, right, bottom);
+ AColor::Line(*dc, right, r.y, right, bottom);
// background
AColor::Dark(dc, false);
// bottom
- dc->DrawLine(r.x, bottom, r.x + 1, bottom);
+ AColor::Line(*dc, r.x, bottom, r.x + 1, bottom);
// right
- dc->DrawLine(right, r.y, right, r.y + 1);
+ AColor::Line(*dc, right, r.y, right, r.y + 1);
}
/// Returns the string to be displayed in the track label
@@ -6921,6 +6919,25 @@
int i;
for(i=0; i<16; i++)
MakeMoreSliders();
+
+ int fontSize = 10;
+#if defined(__WXMSW__) || defined(__WXGTK__)
+ fontSize = 10;
+#endif
+ mFont.Create(fontSize, wxSWISS, wxNORMAL, wxNORMAL);
+
+ int allowableWidth = GetTitleWidth() - 2; // 2 to allow for left/right
borders
+ int textWidth, textHeight;
+ do {
+ mFont.SetPointSize(fontSize);
+ pParent->GetTextExtent(_("Stereo, 999999Hz"),
+ &textWidth,
+ &textHeight,
+ NULL,
+ NULL,
+ &mFont);
+ fontSize--;
+ } while (textWidth >= allowableWidth);
}
TrackInfo::~TrackInfo()
@@ -7005,21 +7022,27 @@
dest.height = 15;
}
+/// \todo Probably should move to 'Utils.cpp'.
+void TrackInfo::SetTrackInfoFont(wxDC * dc)
+{
+ dc->SetFont(mFont);
+}
+
void TrackInfo::DrawBordersWithin(wxDC * dc, const wxRect r, bool bHasMuteSolo
)
{
dc->SetPen(*wxBLACK_PEN);
// These black lines are actually within TrackInfo...
- dc->DrawLine(r.x, r.y + 16, GetTitleWidth(), r.y + 16); // title bar
- dc->DrawLine(r.x + 16, r.y, r.x + 16, r.y + 16); // close box
+ AColor::Line(*dc, r.x, r.y + 16, GetTitleWidth(), r.y + 16); // title
bar
+ AColor::Line(*dc, r.x + 16, r.y, r.x + 16, r.y + 16); // close box
if( bHasMuteSolo && (r.height > (66+18) ))
{
- dc->DrawLine(r.x, r.y + 50, GetTitleWidth(), r.y + 50); // bevel above
mute/solo
- dc->DrawLine(r.x+48 , r.y+50, r.x+48, r.y + 66); // line between
mute/solo
- dc->DrawLine(r.x, r.y + 66, GetTitleWidth(), r.y + 66); // bevel below
mute/solo
+ AColor::Line(*dc, r.x, r.y + 50, GetTitleWidth(), r.y + 50); // bevel
above mute/solo
+ AColor::Line(*dc, r.x+48 , r.y+50, r.x+48, r.y + 66); // line
between mute/solo
+ AColor::Line(*dc, r.x, r.y + 66, GetTitleWidth(), r.y + 66); // bevel
below mute/solo
}
- dc->DrawLine(r.x, r.y + r.height - 19, GetTitleWidth(), r.y + r.height -
19); // minimize bar
+ AColor::Line(*dc, r.x, r.y + r.height - 19, GetTitleWidth(), r.y + r.height
- 19); // minimize bar
}
void TrackInfo::DrawBackground(wxDC * dc, const wxRect r, bool bSelected,
@@ -7062,8 +7085,8 @@
void TrackInfo::DrawCloseBox(wxDC * dc, const wxRect r, bool down)
{
- const int xSize=7;
- const int offset=5;
+ wxRect bev;
+ GetCloseBoxRect(r, bev);
#ifdef EXPERIMENTAL_THEMING
wxPen pen( theTheme.Colour( clrTrackPanelText ));
@@ -7072,13 +7095,19 @@
dc->SetPen(*wxBLACK_PEN);
#endif
- // close "x"
- dc->DrawLine(r.x + offset , r.y + offset, r.x + offset+xSize ,
r.y + offset+xSize);
- dc->DrawLine(r.x + offset+1, r.y + offset, r.x + offset+xSize+1,
r.y + offset+xSize);
- dc->DrawLine(r.x + xSize + offset , r.y + offset, r.x + offset,
r.y + offset+xSize);
- dc->DrawLine(r.x + xSize + offset-1, r.y + offset, r.x + offset-1,
r.y + offset+xSize);
- wxRect bev;
- GetCloseBoxRect(r, bev);
+ // Draw the "X"
+ const int s = 6;
+
+ int ls = bev.x + ((bev.width - s) / 2);
+ int ts = bev.y + ((bev.height - s) / 2);
+ int rs = ls + s;
+ int bs = ts + s;
+
+ AColor::Line(*dc, ls, ts, rs, bs);
+ AColor::Line(*dc, ls + 1, ts, rs + 1, bs);
+ AColor::Line(*dc, rs, ts, ls, bs);
+ AColor::Line(*dc, rs + 1, ts, ls + 1, bs);
+
bev.Inflate(-1, -1);
AColor::BevelTrackInfo(*dc, !down, bev);
}
@@ -7110,21 +7139,19 @@
// Pop-up triangle
#ifdef EXPERIMENTAL_THEMING
- wxPen pen( theTheme.Colour( clrTrackPanelText ));
- dc->SetPen( pen );
+ wxColour c = theTheme.Colour( clrTrackPanelText );
#else
- dc->SetPen(*wxBLACK_PEN);
+ wxColour c = *wxBLACK;
#endif
- int xx = r.x + GetTitleWidth() - 16 - kLeftInset;
- int yy = r.y + 5;
- int triWid = 11;
- while (triWid >= 1) {
- dc->DrawLine(xx, yy, xx + triWid, yy);
- xx++;
- yy++;
- triWid -= 2;
- }
+ dc->SetPen(c);
+ dc->SetBrush(c);
+
+ int s = 10; // Width of dropdown arrow...height is half of width
+ AColor::Arrow(*dc,
+ bev.GetRight() - s - 3, // 3 to offset from right border
+ bev.y + ((bev.height - (s / 2)) / 2),
+ s);
AColor::BevelTrackInfo(*dc, !down, bev);
}
@@ -7183,45 +7210,23 @@
wxRect bev;
GetMinimizeRect(r, bev, minimized);
+ // Clear background to get rid of previous arrow
AColor::MediumTrackInfo(dc, t->GetSelected());
dc->DrawRectangle(bev);
-
- // Calculate center
- int x = bev.x + bev.width / 2;
- int y = bev.y + bev.height / 2;
-
- wxPoint pts[3];
-
- if (minimized)
- {
- pts[0].x = x - 4;
- pts[0].y = y - 3;
- pts[1].x = x + 4;
- pts[1].y = y - 3;
- pts[2].x = x;
- pts[2].y = y + 3;
-
- } else
- {
- pts[0].x = x;
- pts[0].y = y - 3;
- pts[1].x = x + 4;
- pts[1].y = y + 3;
- pts[2].x = x - 4;
- pts[2].y = y + 3;
- }
-
#ifdef EXPERIMENTAL_THEMING
- wxPen pen( theTheme.Colour( clrTrackPanelText ));
- wxBrush brush( theTheme.Colour( clrTrackPanelText ));
- dc->SetPen( pen );
- dc->SetBrush( brush );
+ wxColour c = theTheme.Colour(clrTrackPanelText);
+ dc->SetBrush(c);
+ dc->SetPen(c);
#else
AColor::Dark(dc, t->GetSelected());
#endif
-
- dc->DrawPolygon(3, pts);
+
+ AColor::Arrow(*dc,
+ bev.x - 5 + bev.width / 2,
+ bev.y - 2 + bev.height / 2,
+ 10,
+ minimized);
AColor::BevelTrackInfo(*dc, !down, bev);
}
Index: NoteTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/NoteTrack.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- NoteTrack.cpp 14 Oct 2008 02:55:01 -0000 1.21
+++ NoteTrack.cpp 16 May 2009 11:13:12 -0000 1.22
@@ -89,13 +89,14 @@
int wid = 23;
int ht = 16;
- if (r.height < ht * 4)
+ if (r.height < ht * 4) {
return;
+ }
- int x = r.x + r.width / 2 - wid * 2;
- int y = r.y + 4;
+ int x = r.x + (r.width / 2 - wid * 2) + 2;
+ int y = r.y + 5;
- for (int row = 0; row < 4; row++)
+ for (int row = 0; row < 4; row++) {
for (int col = 0; col < 4; col++) {
int channel = row * 4 + col + 1;
@@ -110,23 +111,31 @@
dc.DrawRectangle(box);
AColor::LightMIDIChannel(&dc, channel);
- dc.DrawLine(box.x, box.y, box.x + box.width - 1, box.y);
- dc.DrawLine(box.x, box.y, box.x, box.y + box.height - 1);
+ AColor::Line(dc, box.x, box.y, box.x + box.width - 1, box.y);
+ AColor::Line(dc, box.x, box.y, box.x, box.y + box.height - 1);
AColor::DarkMIDIChannel(&dc, channel);
- dc.DrawLine(box.x + box.width - 1, box.y,
- box.x + box.width - 1, box.y + box.height);
- dc.DrawLine(box.x, box.y + box.height - 1, box.x + box.width,
- box.y + box.height - 1);
+ AColor::Line(dc,
+ box.x + box.width - 1, box.y,
+ box.x + box.width - 1, box.y + box.height - 1);
+ AColor::Line(dc,
+ box.x, box.y + box.height - 1,
+ box.x + box.width - 1, box.y + box.height - 1);
} else {
AColor::MIDIChannel(&dc, 0);
dc.DrawRectangle(box);
}
- dc.DrawText(wxString::Format(wxT("%d"), channel), box.x + 5,
- box.y + 3);
- }
+ wxString t;
+ long w;
+ long h;
+ t.Printf(wxT("%d"), channel);
+ dc.GetTextExtent(t, &w, &h);
+
+ dc.DrawText(t, box.x + (box.width - w) / 2, box.y + (box.height - h)
/ 2);
+ }
+ }
}
bool NoteTrack::LabelClick(wxRect & r, int mx, int my, bool right)
@@ -137,8 +146,8 @@
if (r.height < ht * 4)
return false;
- int x = r.x + r.width / 2 - wid * 2;
- int y = r.y + 4;
+ int x = r.x + (r.width / 2 - wid * 2);
+ int y = r.y + 1;
int col = (mx - x) / wid;
int row = (my - y) / ht;
Index: TimeTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TimeTrack.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- TimeTrack.cpp 16 Feb 2009 19:06:52 -0000 1.19
+++ TimeTrack.cpp 16 May 2009 11:13:12 -0000 1.20
@@ -176,7 +176,7 @@
xmlFile.EndTag(wxT("timetrack"));
}
-void TimeTrack::Draw(wxDC & dc, wxRect & r, double h, double pps)
+void TimeTrack::Draw(wxDC & dc, const wxRect & r, double h, double pps)
{
double tstep = 1.0 / pps; // Seconds per point
double t0 = h;
@@ -227,7 +227,7 @@
for (x = 0; x < mid.width; x++)
{
int thisy = r.y + heights[x];
- dc.DrawLine(mid.x + x, thisy, mid.x + x, thisy+3);
+ AColor::Line(dc, mid.x + x, thisy, mid.x + x, thisy+3);
}
if (heights)
Index: TrackArtist.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackArtist.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- TrackArtist.h 29 Mar 2009 11:08:48 -0000 1.42
+++ TrackArtist.h 16 May 2009 11:13:12 -0000 1.43
@@ -48,12 +48,17 @@
~TrackArtist();
void SetColours();
- void DrawTracks(TrackList * tracks, Track * start,
+ void DrawTracks(TrackList *tracks, Track *start,
wxDC & dc, wxRegion & reg,
- wxRect & r, wxRect & clip, ViewInfo * viewInfo,
- bool drawEnvelope,bool drawSamples,bool drawSliders);
+ wxRect & r, wxRect & clip, ViewInfo *viewInfo,
+ bool drawEnvelope, bool drawSamples, bool drawSliders);
- void DrawVRuler(Track * t, wxDC * dc, wxRect & r);
+ void DrawTrack(const Track *t,
+ wxDC & dc, const wxRect & r, const ViewInfo *viewInfo,
+ bool drawEnvelope, bool drawSamples, bool drawSliders,
+ bool hasSolo);
+
+ void DrawVRuler(Track *t, wxDC *dc, wxRect & r);
void UpdateVRuler(Track *t, wxRect & r);
@@ -61,73 +66,93 @@
void UpdatePrefs();
+ void InvalidateSpectrumCache(TrackList *tracks);
+ void InvalidateSpectrumCache(WaveTrack *track);
+ int GetSpectrumMinFreq(int deffreq);
+ int GetSpectrumMaxFreq(int deffreq);
+ int GetSpectrumLogMinFreq(int deffreq);
+ int GetSpectrumLogMaxFreq(int deffreq);
+ int GetSpectrumWindowSize();
+
+#ifdef EXPERIMENTAL_FFT_SKIP_POINTS
+ int GetSpectrumFftSkipPoints();
+#endif
+
+ void SetSpectrumMinFreq(int freq);
+ void SetSpectrumMaxFreq(int freq);
+ void SetSpectrumLogMinFreq(int freq);
+ void SetSpectrumLogMaxFreq(int freq);
+
+ void SetBackgroundBrushes(wxBrush unselectedBrush, wxBrush selectedBrush,
+ wxPen unselectedPen, wxPen selectedPen) {
+ this->unselectedBrush = unselectedBrush;
+ this->selectedBrush = selectedBrush;
+ this->unselectedPen = unselectedPen;
+ this->selectedPen = selectedPen;
+ }
+
+ private:
+
//
// Lower-level drawing functions
//
void DrawWaveform(WaveTrack *track,
- wxDC & dc, wxRect & r,
- ViewInfo * viewInfo,
- bool drawEnvelope, bool drawSamples,
- bool drawSliders, bool dB, bool muted);
+ wxDC & dc, const wxRect & r, const ViewInfo *viewInfo,
+ bool drawEnvelope, bool drawSamples, bool drawSliders,
+ bool dB, bool muted);
void DrawSpectrum(WaveTrack *track,
- wxDC & dc, wxRect & r,
- ViewInfo * viewInfo, bool autocorrelation, bool logF);
+ wxDC & dc, const wxRect & r, const ViewInfo *viewInfo,
+ bool autocorrelation, bool logF);
#ifdef USE_MIDI
void DrawNoteTrack(NoteTrack *track,
- wxDC & dc, wxRect & r, ViewInfo * viewInfo);
+ wxDC & dc, const wxRect & r, const ViewInfo *viewInfo);
#endif // USE_MIDI
void DrawLabelTrack(LabelTrack *track,
- wxDC & dc, wxRect & r, ViewInfo * viewInfo);
+ wxDC & dc, const wxRect & r, const ViewInfo *viewInfo);
void DrawTimeTrack(TimeTrack *track,
- wxDC & dc, wxRect & r, ViewInfo * viewInfo);
+ wxDC & dc, const wxRect & r, const ViewInfo *viewInfo);
void DrawTimeSlider(WaveTrack *track,
- wxDC & dc, wxRect & r, ViewInfo * viewInfo,
+ wxDC & dc, const wxRect & r, const ViewInfo *viewInfo,
bool rightwards);
- void DrawClipWaveform(WaveTrack* track, WaveClip* clip,
- wxDC & dc, wxRect & r,
- ViewInfo * viewInfo,
- bool drawEnvelope,
- bool drawSamples,
- bool drawSliders,
+ void DrawClipWaveform(WaveTrack *track, WaveClip *clip,
+ wxDC & dc, const wxRect & r, const ViewInfo *viewInfo,
+ bool drawEnvelope, bool drawSamples, bool drawSliders,
bool dB, bool muted);
void DrawClipSpectrum(WaveTrack *track, WaveClip *clip,
- wxDC & dc, wxRect & r,
- ViewInfo * viewInfo, bool autocorrelation, bool logF);
+ wxDC & dc, const wxRect & r, const ViewInfo *viewInfo,
+ bool autocorrelation, bool logF);
- void InvalidateSpectrumCache(TrackList *tracks);
- void InvalidateSpectrumCache(WaveTrack *track);
+ // Waveform utility functions
- void SetBackgroundBrushes(wxBrush unselectedBrush, wxBrush selectedBrush,
- wxPen unselectedPen, wxPen selectedPen) {
- this->unselectedBrush = unselectedBrush;
- this->selectedBrush = selectedBrush;
- this->unselectedPen = unselectedPen;
- this->selectedPen = selectedPen;
- }
+ void DrawWaveformBackground(wxDC & dc, const wxRect &r, const double env[],
+ float zoomMin, float zoomMax, bool dB,
+ const sampleCount where[],
+ sampleCount ssel0, sampleCount ssel1,
+ bool drawEnvelope);
- int GetSpectrumMinFreq(int deffreq);
- int GetSpectrumMaxFreq(int deffreq);
- int GetSpectrumLogMinFreq(int deffreq);
- int GetSpectrumLogMaxFreq(int deffreq);
- int GetSpectrumWindowSize();
+ void DrawMinMaxRMS(wxDC & dc, const wxRect & r, const double env[],
+ float zoomMin, float zoomMax, bool dB,
+ const float min[], const float max[], const float rms[],
+ const int bl[], bool showProgress, bool muted);
-#ifdef EXPERIMENTAL_FFT_SKIP_POINTS
- int GetSpectrumFftSkipPoints();
-#endif
+ void DrawIndividualSamples(wxDC & dc, const wxRect & r,
+ float zoomMin, float zoomMax, bool dB,
+ WaveClip *clip,
+ double t0, double pps, double h,
+ bool drawSamples, bool showPoints, bool muted);
- void SetSpectrumMinFreq(int freq);
- void SetSpectrumMaxFreq(int freq);
- void SetSpectrumLogMinFreq(int freq);
- void SetSpectrumLogMaxFreq(int freq);
+ void DrawNegativeOffsetTrackArrows(wxDC & dc, const wxRect & r);
- private:
+ void DrawEnvelope(wxDC & dc, const wxRect & r, const double env[],
+ float zoomMin, float zoomMax, bool dB);
+ void DrawEnvLine(wxDC & dc, const wxRect & r, int x, int y, int cy, bool
top);
// Preference values
float mdBrange; // "/GUI/EnvdBRange"
@@ -192,41 +217,6 @@
int findNotesNOld;
bool findNotesQuantizeOld;
#endif
-
- // Waveform utility functions
-
- void DrawWaveformBackground(wxDC &dc, wxRect r, uchar *imageBuffer,
- sampleCount *where, sampleCount ssel0,
sampleCount ssel1,
- double *env,
- float zoomMin, float zoomMax,
- bool dB, bool drawEnvelope);
-
- void DrawIndividualSamples(wxDC &dc, wxRect r,
- WaveTrack *track,
- double t0, double pps, double h,
- float zoomMin, float zoomMax,
- bool dB,
- bool drawSamples,
- bool showPoints, bool muted);
-
- void DrawIndividualClipSamples(wxDC &dc, wxRect r,
- WaveClip *clip,
- double t0, double pps, double h,
- float zoomMin, float zoomMax,
- bool dB,
- bool drawSamples,
- bool showPoints, bool muted);
-
- void DrawMinMaxRMS(wxDC &dc, wxRect r, uchar *imageBuffer,
- float zoomMin, float zoomMax,
- double *envValues,
- float *min, float *max, float *rms,int* bl,
- bool dB, bool muted, bool showProgress);
-
- void DrawNegativeOffsetTrackArrows(wxDC &dc, wxRect &r);
-
- void DrawEnvLine(wxDC &dc, wxRect r, int x, int y, bool top);
-
};
extern int GetWaveYPos(float value, float min, float max,
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs