303{
304 wxPaintDC dc(this);
305
306 int width, height;
307 GetSize(&width, &height);
308
309 double rangeDB = 60;
310
311
312 int w = 0;
313 int h = 0;
314
316 vRuler.SetBounds(0, 0, width, height);
317 vRuler.SetOrientation(wxVERTICAL);
318 vRuler.SetRange(0, -rangeDB);
319 vRuler.SetUnits(
XO(
"dB"));
320 vRuler.GetMaxSize(&w, NULL);
321
323 hRuler.SetBounds(0, 0, width, height);
324 hRuler.SetOrientation(wxHORIZONTAL);
325 hRuler.SetRange(-rangeDB, 0);
326 hRuler.SetUnits(
XO(
"dB"));
327 hRuler.SetFlip(true);
328 hRuler.GetMaxSize(NULL, &h);
329
330 vRuler.SetBounds(0, 0, w, height - h);
331 hRuler.SetBounds(w, height - h, width, height);
332
335
336#if defined(__WXMSW__)
337 dc.Clear();
338#endif
339
340 wxRect border;
341 border.x = w;
342 border.y = 0;
343 border.width = width - w;
344 border.height = height - h + 1;
345
346 dc.SetBrush(*wxWHITE_BRUSH);
347 dc.SetPen(*wxBLACK_PEN);
348 dc.DrawRectangle(border);
349
350 wxRect envRect = border;
351 envRect.Deflate( 2, 2 );
352
355
356 int finalY = envRect.height;
358
359
360
361
362
363
364
365
366
367
368
369
370
372
374 envRect.x,
375 envRect.y + envRect.height - startY,
376 envRect.x + kneeX - 1,
377 envRect.y + envRect.height - kneeY);
378
380 envRect.x + kneeX,
381 envRect.y + envRect.height - kneeY,
382 envRect.x + envRect.width - 1,
383 envRect.y + envRect.height - finalY);
384
385
386 dc.SetBrush(*wxTRANSPARENT_BRUSH);
387 dc.SetPen(*wxBLACK_PEN);
388 dc.DrawRectangle(border);
389
390 vRuler.Draw(dc);
391 hRuler.Draw(dc);
392}
static wxPen WideEnvelopePen
static void Line(wxDC &dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
static const LinearUpdater & Instance()
wxColour & Colour(int iIndex)