3017{
3018 wxPaintDC dc(this);
3022 }
3023 int width, height;
3024 GetSize(&width, &height);
3025
3027 {
3031 }
3032
3033 wxBrush bkgndBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
3034
3035 wxMemoryDC memDC;
3037
3038 wxRect bkgndRect;
3039 bkgndRect.x = 0;
3040 bkgndRect.y = 0;
3041 bkgndRect.width =
mWidth;
3043 memDC.SetBrush(bkgndBrush);
3044 memDC.SetPen(*wxTRANSPARENT_PEN);
3045 memDC.DrawRectangle(bkgndRect);
3046
3048 memDC.DrawRectangle(bkgndRect);
3049
3050 wxRect border;
3051 border.x = 0;
3052 border.y = 0;
3055
3056 memDC.SetBrush(*wxWHITE_BRUSH);
3057 memDC.SetPen(*wxBLACK_PEN);
3058 memDC.DrawRectangle(border);
3059
3062
3063
3064 memDC.SetPen(wxPen(
theTheme.
Colour( clrGraphLines ), 1, wxPENSTYLE_SOLID));
3069
3070
3072 {
3075 }
3076
3077
3078 memDC.SetPen(wxPen(
theTheme.
Colour(clrGraphLines), 3, wxPENSTYLE_SOLID));
3079
3080
3081 int x, y, xlast = 0, ylast = 0;
3082 {
3085 bool off = false, off1 = false;
3086 for (
int i = 0; i <
mEnvRect.width; i++)
3087 {
3091 {
3093 off = true;
3094 }
3095 else
3096 {
3097 off = false;
3098 off1 = false;
3099 }
3100 if ((i != 0) & (!off1))
3101 {
3104 }
3105 off1 = off;
3106 xlast = x;
3108 }
3109 }
3110
3111
3112
3113 memDC.SetPen(wxPen(
theTheme.
Colour( clrResponseLines ), 1, wxPENSTYLE_SOLID));
3115 double yF;
3117
3119
3122 step /= ((double)
mEnvRect.width-1.);
3123 double freq;
3125 int n;
3126 for(
int i=0; i<
mEnvRect.width; i++)
3127 {
3129 freq = lin ? step*i : pow(10., loLog + i*step);
3130 if( ( lin ? step : (pow(10., loLog + (i+1)*step)-freq) ) < delta)
3131 {
3132
3134 double wtemp = sin(0.5 * theta);
3135 double wpr = -2.0 * wtemp * wtemp;
3136 double wpi = -1.0 * sin(theta);
3137 double wr = cos(theta*halfM);
3138 double wi = sin(theta*halfM);
3139
3140 yF = 0.;
3141 for(int j=0;j<halfM;j++)
3142 {
3143 yF += 2. *
mOutr[j] * wr;
3144
3145 wr = (wtemp = wr) * wpr - wi * wpi + wr;
3146 wi = wi * wpr + wtemp * wpi + wi;
3147 }
3149 yF = fabs(yF);
3150 if(yF!=0.)
3152 else
3154 }
3155 else
3156 {
3157 n = (int)(freq/delta + .5);
3160 else
3162 }
3163 if(yF < mEffect->mdBMin)
3165 yF = center-scale*yF;
3168 if(yF<0.)
3169 yF=0.;
3170 y = (int)(yF+.5);
3171
3172 if (i != 0)
3173 {
3175 }
3176 xlast = x;
3178 }
3179
3180 memDC.SetPen(*wxBLACK_PEN);
3182 {
3184
3185
3186
3188
3189 artist.pZoomInfo = &zoomInfo;
3194 }
3195
3196 dc.Blit(0, 0,
mWidth,
mHeight, &memDC, 0, 0, wxCOPY, FALSE);
3197}
static void Line(wxDC &dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
static void DrawPoints(const Envelope &env, TrackPanelDrawingContext &context, const wxRect &r, bool dB, double dBRange, float zoomMin, float zoomMax, bool mirrored, int origin=0)
void GetValues(double *buffer, int len, double t0, double tstep) const
Get many envelope points at once.
void DrawGrid(wxDC &dc, int length, bool minor=true, bool major=true, int xOffset=0, int yOffset=0) const
wxColour & Colour(int iIndex)
This class handles the actual rendering of WaveTracks (both waveforms and spectra),...