summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_column_labels.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-11-05 16:05:36 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-11-05 16:05:36 +0000
commite69bfc745b716e2c35ba7e6b8db4944685f0bec4 (patch)
treeadf43bbfd245e86a332b287a3f7cbc22ff36a86a /gtk2_ardour/port_matrix_column_labels.cc
parente12432cc632125821d6ed192d129ef385fb25002 (diff)
use cairo image surfaces, not GdkPixmap, when computing text sizes for port matrix labels
git-svn-id: svn://localhost/ardour2/branches/3.0@10460 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_column_labels.cc')
-rw-r--r--gtk2_ardour/port_matrix_column_labels.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk2_ardour/port_matrix_column_labels.cc b/gtk2_ardour/port_matrix_column_labels.cc
index 091eb0f9da..1cdf510c59 100644
--- a/gtk2_ardour/port_matrix_column_labels.cc
+++ b/gtk2_ardour/port_matrix_column_labels.cc
@@ -39,9 +39,8 @@ PortMatrixColumnLabels::PortMatrixColumnLabels (PortMatrix* m, PortMatrixBody* b
void
PortMatrixColumnLabels::compute_dimensions ()
{
- GdkPixmap* pm = gdk_pixmap_new (NULL, 1, 1, gdk_visual_get_depth (gdk_visual_get_system ()));
- gdk_drawable_set_colormap (pm, gdk_colormap_get_system());
- cairo_t* cr = gdk_cairo_create (pm);
+ cairo_surface_t* surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 200, 200);
+ cairo_t* cr = cairo_create (surface);
/* width of the longest bundle name */
_longest_bundle_name = 0;
@@ -95,7 +94,7 @@ PortMatrixColumnLabels::compute_dimensions ()
}
cairo_destroy (cr);
- g_object_unref (pm);
+ cairo_surface_destroy (surface);
/* height of the whole thing */