src/tracks/labeltrack/ui/LabelTrackView.cpp
/// DrawGlyphs draws the wxIcons at the start and end of a label.
///   @param  dc the device context
///   @param  r  the LabelTrack rectangle.
DrawGlyphs draws the wxIcons at the start and end of a label.
DrawGlyphs draws the wxIcons at the start and end of a label .
void LabelTrackView::DrawGlyphs(
   wxDC & dc, const LabelStruct &ls, const wxRect & r,
   int GlyphLeft, int GlyphRight)
{
   auto &y = ls.y;
   const int xHalfWidth=mIconWidth/2;
   const int yStart=y-mIconHeight/2+(mTextHeight+3)/2;
   if( y == -1 )
      return;
   auto &x = ls.x;
   auto &x1 = ls.x1;
   if((x  >= r.x) && (x  <= (r.x+r.width)))
      dc.DrawBitmap(GetGlyph(GlyphLeft), x-xHalfWidth,yStart, true);
   if((x1 >= r.x) && (x1 <= (r.x+r.width)) )
      dc.DrawBitmap(GetGlyph(GlyphRight), x1-xHalfWidth,yStart, true);
}
void LabelTrackView :: DrawGlyphs ( wxDC & dc , const LabelStruct & ls , const wxRect & r , int GlyphLeft , int GlyphRight ) { auto & y = ls . y ; const int xHalfWidth = mIconWidth / 2 ; const int yStart = y - mIconHeight / 2 + ( mTextHeight + 3 ) / 2 ; if ( y == -1 ) return ; auto & x = ls . x ; auto & x1 = ls . x1 ; if ( ( x >= r . x ) && ( x <= ( r . x + r . width ) ) ) dc . DrawBitmap ( GetGlyph ( GlyphLeft ) , x - xHalfWidth , yStart , true ) ; if ( ( x1 >= r . x ) && ( x1 <= ( r . x + r . width ) ) ) dc . DrawBitmap ( GetGlyph ( GlyphRight ) , x1 - xHalfWidth , yStart , true ) ; }
DrawGlyphs draws the wxIcons at the start and end of a label.
DrawGlyphs draws the wxIcons at the start and end of a label .
// If y == -1, nothing to draw // The extra test commented out here would suppress right hand markers // when they overlap the left hand marker (e.g. zoomed out) or to the left. /*&& (x1>x+mIconWidth)*/