- frame = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
- gnome_canvas_simplerect_get_type(),
- "x1", (double) 0.0,
- "y1", (double) 1.0,
- "x2", (double) trackview.editor.frame_to_pixel(duration),
- "y2", (double) trackview.height,
- "outline_color_rgba", color_map[cTimeAxisFrameOutline],
- "fill_color_rgba", color_map[cTimeAxisFrameFill],
- NULL);
+ frame = new ArdourCanvas::SimpleRect (*group);
+ frame->property_x1() = (double) 0.0;
+ frame->property_y1() = (double) 1.0;
+ frame->property_x2() = (double) trackview.editor.frame_to_pixel(duration);
+ frame->property_y2() = (double) trackview.height;
+ frame->property_outline_color_rgba() = color_map[cTimeAxisFrameOutline];
+ frame->property_fill_color_rgba() = color_map[cTimeAxisFrameFill];
+
+ /* by default draw all 4 edges */
+
+ uint32_t outline_what = 0x1|0x2|0x4|0x8;
+
+ if (visibility & HideFrameLeft) {
+ outline_what &= ~(0x1);
+ }
+
+ if (visibility & HideFrameRight) {
+ outline_what &= ~(0x2);
+ }
+
+ if (visibility & HideFrameTB) {
+ outline_what &= ~(0x4 | 0x8);
+ }
+
+ frame->property_outline_what() = outline_what;
+