src/tracks/labeltrack/ui/LabelTrackView.cpp
/// Draws text-selected region within the label
Draws text-selected region within the label
Draws text - selected region within the label
void LabelTrackView::DrawHighlight( wxDC & dc, const LabelStruct &ls,
   int xPos1, int xPos2, int charHeight)
{
   const int yFrameHeight = mTextHeight + TextFramePadding * 2;
   dc.SetPen(*wxTRANSPARENT_PEN);
   wxBrush curBrush = dc.GetBrush();
   curBrush.SetColour(wxString(wxT("BLUE")));
   auto top = ls.y + TextFrameYOffset - (LabelBarHeight + yFrameHeight) / 2 + (yFrameHeight - charHeight) / 2;
   if (xPos1 < xPos2)
      dc.DrawRectangle(xPos1-1, top, xPos2-xPos1+1, charHeight);
   else
      dc.DrawRectangle(xPos2-1, top, xPos1-xPos2+1, charHeight);
}
void LabelTrackView :: DrawHighlight ( wxDC & dc , const LabelStruct & ls , int xPos1 , int xPos2 , int charHeight ) { const int yFrameHeight = mTextHeight + TextFramePadding * 2 ; dc . SetPen ( * wxTRANSPARENT_PEN ) ; wxBrush curBrush = dc . GetBrush ( ) ; curBrush . SetColour ( wxString ( wxT ( " " ) ) ) ; auto top = ls . y + TextFrameYOffset - ( LabelBarHeight + yFrameHeight ) / 2 + ( yFrameHeight - charHeight ) / 2 ; if ( xPos1 < xPos2 ) dc . DrawRectangle ( xPos1 - 1 , top , xPos2 - xPos1 + 1 , charHeight ) ; else dc . DrawRectangle ( xPos2 - 1 , top , xPos1 - xPos2 + 1 , charHeight ) ; }
Draws text-selected region within the label
Draws text - selected region within the label