+void
+PortMatrixGrid::draw_association_indicator (cairo_t* cr, uint32_t x, uint32_t y, double p)
+{
+ set_source_rgba (cr, association_colour(), 0.5);
+
+ cairo_arc (
+ cr,
+ x + grid_spacing() / 2,
+ y + grid_spacing() / 2,
+ (grid_spacing() - (2 * connection_indicator_pad())) / 2,
+ 0,
+ p * 2 * M_PI
+ );
+
+ cairo_fill (cr);
+}
+
+void
+PortMatrixGrid::draw_empty_square (cairo_t* cr, uint32_t x, uint32_t y)
+{
+ set_source_rgb (cr, background_colour());
+ cairo_rectangle (
+ cr,
+ x + thick_grid_line_width(),
+ y + thick_grid_line_width(),
+ grid_spacing() - 2 * thick_grid_line_width(),
+ grid_spacing() - 2 * thick_grid_line_width()
+ );
+ cairo_fill (cr);
+}
+
+/** Draw a square to indicate that two channels in a matrix cannot be associated
+ * with each other.
+ */
+void
+PortMatrixGrid::draw_non_connectable_indicator (cairo_t* cr, uint32_t x, uint32_t y)
+{
+ set_source_rgb (cr, non_connectable_colour ());
+ cairo_rectangle (
+ cr,
+ x + thick_grid_line_width(),
+ y + thick_grid_line_width(),
+ grid_spacing() - 2 * thick_grid_line_width(),
+ grid_spacing() - 2 * thick_grid_line_width()
+ );
+ cairo_fill (cr);
+}