Update of /cvsroot/audacity/audacity-src/src/toolbars
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6545/toolbars
Modified Files:
ToolBar.cpp ToolDock.cpp ToolManager.cpp
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: ToolManager.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/toolbars/ToolManager.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- ToolManager.cpp 14 Mar 2009 07:39:11 -0000 1.20
+++ ToolManager.cpp 16 May 2009 11:13:13 -0000 1.21
@@ -196,10 +196,10 @@
r.width = sizerW + 2;
r.height = sizerW + 2;
- dc.DrawLine( r.GetLeft(), r.GetBottom(), r.GetRight(), r.GetTop() );
- dc.DrawLine( r.GetLeft() + 3, r.GetBottom(), r.GetRight(), r.GetTop()
+ 3 );
- dc.DrawLine( r.GetLeft() + 6, r.GetBottom(), r.GetRight(), r.GetTop()
+ 6 );
- dc.DrawLine( r.GetLeft() + 9, r.GetBottom(), r.GetRight(), r.GetTop()
+ 9 );
+ AColor::Line(dc, r.GetLeft(), r.GetBottom(), r.GetRight(), r.GetTop()
);
+ AColor::Line(dc, r.GetLeft() + 3, r.GetBottom(), r.GetRight(),
r.GetTop() + 3 );
+ AColor::Line(dc, r.GetLeft() + 6, r.GetBottom(), r.GetRight(),
r.GetTop() + 6 );
+ AColor::Line(dc, r.GetLeft() + 9, r.GetBottom(), r.GetRight(),
r.GetTop() + 9 );
}
}
Index: ToolDock.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/toolbars/ToolDock.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ToolDock.cpp 6 Apr 2009 01:05:51 -0000 1.9
+++ ToolDock.cpp 16 May 2009 11:13:13 -0000 1.10
@@ -529,8 +529,8 @@
// Draw the initial horizontal and vertical gaps
wxSize sz = GetClientSize();
- dc.DrawLine( 0, 0, sz.GetWidth(), 0 );
- dc.DrawLine( 0, 0, 0, sz.GetHeight() );
+ AColor::Line(dc, 0, 0, sz.GetWidth(), 0 );
+ AColor::Line(dc, 0, 0, 0, sz.GetHeight() );
// Draw the gap between each bar
int ndx, cnt = mDockedBars.GetCount();
@@ -538,10 +538,11 @@
{
wxRect r = ( (ToolBar *)mDockedBars[ ndx ] )->GetRect();
- dc.DrawLine( r.GetLeft(),
- r.GetBottom() + 1,
- sz.GetWidth(),
- r.GetBottom() + 1 );
+ AColor::Line( dc,
+ r.GetLeft(),
+ r.GetBottom() + 1,
+ sz.GetWidth(),
+ r.GetBottom() + 1 );
// For all bars but the last...
if( ndx < cnt - 1 )
@@ -550,7 +551,8 @@
// horizontal gap line
if( r.y == ( (ToolBar *)mDockedBars[ ndx + 1 ] )->GetRect().y )
{
- dc.DrawLine( r.GetRight() + 1,
+ AColor::Line(dc,
+ r.GetRight() + 1,
r.GetTop(),
r.GetRight() + 1,
r.GetBottom() + 1 );
Index: ToolBar.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/toolbars/ToolBar.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- ToolBar.cpp 6 Apr 2009 01:05:51 -0000 1.16
+++ ToolBar.cpp 16 May 2009 11:13:13 -0000 1.17
@@ -547,7 +547,7 @@
}
wxPen Pen( col );
dc.SetPen(Pen );
- dc.DrawLine( 0, y, sz.x, y );
+ AColor::Line(dc, 0, y, sz.x, y );
}
}
#endif
@@ -558,8 +558,8 @@
wxSize sz = GetSize();
AColor::Dark( &dc, false );
- dc.DrawLine( sz.x - 4, 0, sz.x - 4, sz.y );
- dc.DrawLine( sz.x - 1, 0, sz.x - 1, sz.y );
+ AColor::Line(dc, sz.x - 4, 0, sz.x - 4, sz.y );
+ AColor::Line(dc, sz.x - 1, 0, sz.x - 1, sz.y );
}
}
------------------------------------------------------------------------------
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