21 #ifndef _WIDGETS_ARDOUR_SPACER_H_
22 #define _WIDGETS_ARDOUR_SPACER_H_
38 void render (Cairo::RefPtr<Cairo::Context>
const& ctx, cairo_rectangle_t*) {
40 float height = get_height();
42 float h = height * ratio;
43 float t = .5f * (height - h);
44 ctx->rectangle (0, t, 1, h);
53 CairoWidget::on_size_request (req);
65 void render (Cairo::RefPtr<Cairo::Context>
const& ctx, cairo_rectangle_t*) {
67 float width = get_width();
69 float w = width * ratio;
70 float t = .5f * (width - w);
71 ctx->rectangle (t, 0, w, 1);
80 CairoWidget::on_size_request (req);
99 void render (Cairo::RefPtr<Cairo::Context>
const& ctx, cairo_rectangle_t*) {
100 float width = get_width();
101 float height = get_height();
103 Cairo::RefPtr<Cairo::LinearGradient> _gradient;
105 if ( (width>height) || mode == DropShadowBoth ) {
106 _gradient = Cairo::LinearGradient::create (0, 0, 0, 4);
107 _gradient->add_color_stop_rgba (0, 0, 0, 0, alpha);
108 _gradient->add_color_stop_rgba (1, 0, 0, 0, 0);
109 ctx->set_source (_gradient);
110 ctx->rectangle (0, 0, width, 4);
114 if ( (height>width) || mode == DropShadowBoth ) {
115 _gradient = Cairo::LinearGradient::create (0, 0, 4, 0);
116 _gradient->add_color_stop_rgba (0, 0, 0, 0, alpha);
117 _gradient->add_color_stop_rgba (1, 0, 0, 0, 0);
118 ctx->set_source (_gradient);
119 ctx->rectangle (0, 0, 4, height);
void set_source_rgba(Cairo::RefPtr< Cairo::Context >, Gtkmm2ext::Color)