643{
644 wxPaintDC dc(this);
645
646 int width, height;
647 GetSize(&width, &height);
648
649 double rangeDB = 60;
650
651
652 int w = 0;
653 int h = 0;
654
656 vRuler.SetBounds(0, 0, width, height);
657 vRuler.SetOrientation(wxVERTICAL);
658 vRuler.SetRange(0, -rangeDB);
659 vRuler.SetUnits(
XO(
"dB"));
660 vRuler.GetMaxSize(&w, NULL);
661
663 hRuler.SetBounds(0, 0, width, height);
664 hRuler.SetOrientation(wxHORIZONTAL);
665 hRuler.SetRange(-rangeDB, 0);
666 hRuler.SetUnits(
XO(
"dB"));
667 hRuler.SetFlip(true);
668 hRuler.GetMaxSize(NULL, &h);
669
670 vRuler.SetBounds(0, 0, w, height - h);
671 hRuler.SetBounds(w, height - h, width, height);
672
675
676#if defined(__WXMSW__)
677 dc.Clear();
678#endif
679
680 wxRect border;
681 border.x = w;
682 border.y = 0;
683 border.width = width - w;
684 border.height = height - h + 1;
685
686 dc.SetBrush(*wxWHITE_BRUSH);
687 dc.SetPen(*wxBLACK_PEN);
688 dc.DrawRectangle(border);
689
690 wxRect envRect = border;
691 envRect.Deflate( 2, 2 );
692
695
696 int finalY = envRect.height;
698
699
700
701
702
703
704
705
706
707
708
709
710
712
714 envRect.x,
715 envRect.y + envRect.height - startY,
716 envRect.x + kneeX - 1,
717 envRect.y + envRect.height - kneeY);
718
720 envRect.x + kneeX,
721 envRect.y + envRect.height - kneeY,
722 envRect.x + envRect.width - 1,
723 envRect.y + envRect.height - finalY);
724
725
726 dc.SetBrush(*wxTRANSPARENT_BRUSH);
727 dc.SetPen(*wxBLACK_PEN);
728 dc.DrawRectangle(border);
729
730 vRuler.Draw(dc);
731 hRuler.Draw(dc);
732}
static wxPen WideEnvelopePen
static void Line(wxDC &dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
static const LinearUpdater & Instance()
wxColour & Colour(int iIndex)