MCPcopy Create free account
hub / github.com/davisking/dlib / draw_tab

Method draw_tab

dlib/gui_widgets/widgets.cpp:1735–1752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1733// ----------------------------------------------------------------------------------------
1734
1735 void tabbed_display::
1736 draw_tab (
1737 const rectangle& tab,
1738 const canvas& c
1739 ) const
1740 {
1741 const rgb_pixel white(255,255,255);
1742 const rgb_pixel background(212,208,200);
1743 const rgb_pixel dark_gray(64,64,64);
1744 const rgb_pixel gray(128,128,128);
1745 draw_line(c,point(tab.left(),tab.top()+2),point(tab.left(),tab.bottom()),white);
1746 draw_line(c,point(tab.left()+1,tab.top()+2),point(tab.left()+1,tab.bottom()),background);
1747 draw_line(c,point(tab.right(),tab.top()+2),point(tab.right(),tab.bottom()),dark_gray);
1748 draw_line(c,point(tab.right()-1,tab.top()+2),point(tab.right()-1,tab.bottom()),gray);
1749 draw_line(c,point(tab.left()+2,tab.top()),point(tab.right()-2,tab.top()),white);
1750 draw_pixel(c,point(tab.left()+1,tab.top()+1),white);
1751 draw_pixel(c,point(tab.right()-1,tab.top()+1),dark_gray);
1752 }
1753
1754// ----------------------------------------------------------------------------------------
1755

Callers

nothing calls this directly

Calls 7

draw_pixelFunction · 0.85
draw_lineFunction · 0.70
pointClass · 0.70
leftMethod · 0.45
topMethod · 0.45
bottomMethod · 0.45
rightMethod · 0.45

Tested by

no test coverage detected