Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv9393/src
Modified Files:
Tag: AUDACITY_1_2
AColor.cpp AColor.h Envelope.cpp Envelope.h LabelTrack.cpp
LabelTrack.h
Log Message:
Reduce number of GDI handles required on Windows.
Index: Envelope.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Envelope.cpp,v
retrieving revision 1.27.2.5
retrieving revision 1.27.2.6
diff -u -d -r1.27.2.5 -r1.27.2.6
--- Envelope.cpp 12 Apr 2006 22:28:11 -0000 1.27.2.5
+++ Envelope.cpp 6 Nov 2006 04:50:10 -0000 1.27.2.6
@@ -48,9 +48,6 @@
mIsDeleting = false;
mMirror = true;
-
- mPen.SetColour(110, 110, 220);
- mBrush.SetColour(110, 110, 220);
}
Envelope::~Envelope()
@@ -165,14 +162,14 @@
double tright = h + (r.width / pps);
double dBr = gPrefs->Read("/GUI/EnvdBRange", ENV_DB_RANGE);
- dc.SetPen(mPen);
+ dc.SetPen(AColor::envelopePen);
dc.SetBrush(*wxWHITE_BRUSH);
for (int i = 0; i < (int)mEnv.Count(); i++) {
if (mEnv[i]->t >= h && mEnv[i]->t <= tright) {
if (i == mDragPoint) {
- dc.SetPen(mPen);
- dc.SetBrush(mBrush);
+ dc.SetPen(AColor::envelopePen);
+ dc.SetBrush(AColor::envelopeBrush);
}
double v = mEnv[i]->val;
@@ -200,7 +197,7 @@
}
if (i == mDragPoint) {
- dc.SetPen(mPen);
+ dc.SetPen(AColor::envelopePen);
dc.SetBrush(*wxWHITE_BRUSH);
}
}
Index: Envelope.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Envelope.h,v
retrieving revision 1.18.2.1
retrieving revision 1.18.2.2
diff -u -d -r1.18.2.1 -r1.18.2.2
--- Envelope.h 21 Apr 2004 23:32:16 -0000 1.18.2.1
+++ Envelope.h 6 Nov 2006 04:50:10 -0000 1.18.2.2
@@ -196,9 +196,6 @@
bool mDB;
bool mDirty;
- wxPen mPen;
- wxBrush mBrush;
-
// These are memoizing variables for Integral()
double lastIntegral_t0;
double lastIntegral_t1;
Index: LabelTrack.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LabelTrack.h,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -d -r1.8.2.1 -r1.8.2.2
--- LabelTrack.h 29 Jul 2004 07:32:08 -0000 1.8.2.1
+++ LabelTrack.h 6 Nov 2006 04:50:10 -0000 1.8.2.2
@@ -100,20 +100,10 @@
LabelArray mLabels;
- wxBrush mFlagBrush;
- wxBrush mUnselectedBrush;
- wxBrush mSelectedBrush;
-
- wxPen mFlagPen;
- wxPen mUnselectedPen;
- wxPen mSelectedPen;
-
// Used only for a LabelTrack on the clipboard
double mClipLen;
static wxFont msFont;
-
- void InitColours();
};
#endif
Index: LabelTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LabelTrack.cpp,v
retrieving revision 1.21.2.6
retrieving revision 1.21.2.7
diff -u -d -r1.21.2.6 -r1.21.2.7
--- LabelTrack.cpp 5 Nov 2004 17:17:33 -0000 1.21.2.6
+++ LabelTrack.cpp 6 Nov 2006 04:50:10 -0000 1.21.2.7
@@ -16,6 +16,7 @@
#include <wx/textfile.h>
#include <wx/intl.h>
+#include "AColor.h"
#include "LabelTrack.h"
#include "DirManager.h"
#include "Internat.h"
@@ -31,7 +32,6 @@
LabelTrack::LabelTrack(DirManager * projDirManager):
Track(projDirManager)
{
- InitColours();
SetName(_("Label Track"));
ResetFont();
@@ -44,8 +44,6 @@
LabelTrack::LabelTrack(const LabelTrack &orig) :
Track(orig)
{
- InitColours();
-
int len = orig.mLabels.Count();
for (int i = 0; i < len; i++) {
@@ -97,15 +95,15 @@
wxRect before = r;
before.width = int ((dsel0 - h) * pps);
- dc.SetBrush(mUnselectedBrush);
- dc.SetPen(mUnselectedPen);
+ dc.SetBrush(AColor::labelUnselectedBrush);
+ dc.SetPen(AColor::labelUnselectedPen);
dc.DrawRectangle(before);
wxRect selr = r;
selr.x += before.width;
selr.width = int ((dsel1 - dsel0) * pps);
- dc.SetBrush(mSelectedBrush);
- dc.SetPen(mSelectedPen);
+ dc.SetBrush(AColor::labelSelectedBrush);
+ dc.SetPen(AColor::labelSelectedPen);
dc.DrawRectangle(selr);
wxRect after = r;
@@ -115,12 +113,12 @@
after.width -= (r.x - after.x);
after.x = r.x;
}
- dc.SetBrush(mUnselectedBrush);
- dc.SetPen(mUnselectedPen);
+ dc.SetBrush(AColor::labelUnselectedBrush);
+ dc.SetPen(AColor::labelUnselectedPen);
dc.DrawRectangle(after);
- dc.SetBrush(mFlagBrush);
- dc.SetPen(mFlagPen);
+ dc.SetBrush(AColor::labelFlagBrush);
+ dc.SetPen(AColor::labelFlagPen);
int nextx = 0;
@@ -154,7 +152,7 @@
dc.SetBrush(*wxWHITE_BRUSH);
dc.DrawPolygon(3, tri);
if (mSelIndex == i)
- dc.SetBrush(mFlagBrush);
+ dc.SetBrush(AColor::labelFlagBrush);
dc.DrawLine(x, y, x, y + height);
@@ -179,7 +177,7 @@
dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.DrawRectangle(outline);
- dc.SetBrush(mFlagBrush);
+ dc.SetBrush(AColor::labelFlagBrush);
}
mLabels[i]->width = textWidth + 8;
@@ -661,15 +659,3 @@
mSelIndex = pos;
}
-
-// Private method called from the constructor
-void LabelTrack::InitColours()
-{
- mFlagBrush.SetColour(204, 0, 0);
- mUnselectedBrush.SetColour(192, 192, 192);
- mSelectedBrush.SetColour(148, 148, 170);
-
- mFlagPen.SetColour(204, 0, 0);
- mUnselectedPen.SetColour(192, 192, 192);
- mSelectedPen.SetColour(148, 148, 170);
-}
Index: AColor.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AColor.cpp,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -d -r1.10.2.2 -r1.10.2.3
--- AColor.cpp 4 Jun 2006 10:12:53 -0000 1.10.2.2
+++ AColor.cpp 6 Nov 2006 04:50:09 -0000 1.10.2.3
@@ -35,6 +35,14 @@
wxBrush AColor::envelopeBrush;
wxPen AColor::envelopePen;
wxPen AColor::WideEnvelopePen;
+
+wxBrush AColor::labelFlagBrush;
+wxBrush AColor::labelUnselectedBrush;
+wxBrush AColor::labelSelectedBrush;
+wxPen AColor::labelFlagPen;
+wxPen AColor::labelUnselectedPen;
+wxPen AColor::labelSelectedPen;
+
wxBrush AColor::tooltipBrush;
wxFont AColor::labelFont;
@@ -172,7 +180,15 @@
WideEnvelopePen.SetColour(110, 110, 220);
envelopeBrush.SetColour(110, 110, 220);
WideEnvelopePen.SetWidth( 3 );
-
+
+ labelFlagBrush.SetColour(204, 0, 0);
+ labelUnselectedBrush.SetColour(192, 192, 192);
+ labelSelectedBrush.SetColour(148, 148, 170);
+
+ labelFlagPen.SetColour(204, 0, 0);
+ labelUnselectedPen.SetColour(192, 192, 192);
+ labelSelectedPen.SetColour(148, 148, 170);
+
// muteBrush[1] is used when solo is on, since solo overrides mute.
// muteBrush[0].SetColour(110, 220, 110);
// muteBrush[1].SetColour(170, 180, 170);
Index: AColor.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AColor.h,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -d -r1.5.2.1 -r1.5.2.2
--- AColor.h 4 Jun 2006 10:12:53 -0000 1.5.2.1
+++ AColor.h 6 Nov 2006 04:50:09 -0000 1.5.2.2
@@ -60,6 +60,13 @@
static wxPen WideEnvelopePen;
static wxBrush envelopeBrush;
+ static wxBrush labelFlagBrush;
+ static wxBrush labelUnselectedBrush;
+ static wxBrush labelSelectedBrush;
+ static wxPen labelFlagPen;
+ static wxPen labelUnselectedPen;
+ static wxPen labelSelectedPen;
+
static wxBrush tooltipBrush;
static wxFont labelFont;
-------------------------------------------------------------------------
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