| 69 | // ---------------------------------------------------------------------------------------- |
| 70 | |
| 71 | void draw_button_up ( |
| 72 | const canvas& c, |
| 73 | const rectangle& btn, |
| 74 | unsigned char alpha |
| 75 | ) |
| 76 | { |
| 77 | rectangle area = btn.intersect(c); |
| 78 | if (area.is_empty() == false) |
| 79 | { |
| 80 | const rgb_alpha_pixel dark_gray(64,64,64,alpha); |
| 81 | const rgb_alpha_pixel gray(128,128,128,alpha); |
| 82 | const rgb_alpha_pixel white(255,255,255,alpha); |
| 83 | |
| 84 | draw_line(c,point(btn.left(),btn.top()),point(btn.right()-1,btn.top()),white); |
| 85 | |
| 86 | draw_line(c,point(btn.left(),btn.bottom()),point(btn.right(),btn.bottom()),dark_gray); |
| 87 | draw_line(c,point(btn.left()+1,btn.bottom()-1),point(btn.right()-1,btn.bottom()-1),gray); |
| 88 | |
| 89 | draw_line(c,point(btn.left(),btn.top()+1),point(btn.left(),btn.bottom()-1),white); |
| 90 | |
| 91 | draw_line(c,point(btn.right(),btn.top()),point(btn.right(),btn.bottom()-1),dark_gray); |
| 92 | draw_line(c,point(btn.right()-1,btn.top()+1),point(btn.right()-1,btn.bottom()-2),gray); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // ---------------------------------------------------------------------------------------- |
| 97 |
no test coverage detected