dia r4354 - in trunk: . app plug-ins/libart
- From: hans svn gnome org
- To: svn-commits-list gnome org
- Subject: dia r4354 - in trunk: . app plug-ins/libart
- Date: Sun, 29 Mar 2009 19:18:54 +0000 (UTC)
Author: hans
Date: Sun Mar 29 19:18:54 2009
New Revision: 4354
URL: http://svn.gnome.org/viewvc/dia?rev=4354&view=rev
Log:
2009-03-29 Hans Breuer <hans breuer org>
* app/display.c : the interactive cairo renderer has highlighting
issues (bug #576548). For now default to the libart renderer for
the antialiased display renderer (only fall back to cairo if the
libart plug-in is not loaded)
* plug-ins/libart/dialibartrenderer : initialize
DiaRenderer::is_interactive to allow entering text edit mode
Modified:
trunk/ChangeLog
trunk/app/display.c
trunk/plug-ins/libart/dialibartrenderer.c
Modified: trunk/app/display.c
==============================================================================
--- trunk/app/display.c (original)
+++ trunk/app/display.c Sun Mar 29 19:18:54 2009
@@ -1006,36 +1006,39 @@
}
/**
- * Kind of dirty way to init an antialiased renderer, there should be some plug-in interface to do this
- * but first libart needs to be moved out of the core.
+ * Kind of dirty way to init an antialiased renderer, there should be some plug-in interface to do this.
+ * Now with the Libart renderer being a plug-in and the cairo renderer having issues with highlighting
+ * ( http://bugzilla.gnome.org/show_bug.cgi?id=576548 ) it seems reasonable to have default at
+ * Libart, also becuase you loose less when it is switched off ;-)
*/
static DiaRenderer *
new_aa_renderer (DDisplay *ddisp)
{
- GType cairo_renderer_type;
- cairo_renderer_type = g_type_from_name ("DiaCairoInteractiveRenderer");
- if (cairo_renderer_type) {
- DiaRenderer *renderer = g_object_new(cairo_renderer_type, NULL);
+ GType renderer_type;
+
+ renderer_type = g_type_from_name ("DiaLibartRenderer");
+ if (renderer_type) {
+ DiaRenderer *renderer = g_object_new(renderer_type, NULL);
+ g_object_set (renderer,
+ "transform", dia_transform_new (&ddisp->visible, &ddisp->zoom_factor),
+ NULL);
+ return renderer;
+ }
+
+ renderer_type = g_type_from_name ("DiaCairoInteractiveRenderer");
+ if (renderer_type) {
+ DiaRenderer *renderer = g_object_new(renderer_type, NULL);
g_object_set (renderer,
"zoom", &ddisp->zoom_factor,
"rect", &ddisp->visible,
NULL);
return renderer;
- } else {
- GType libart_renderer_type = g_type_from_name ("DiaLibartRenderer");
- if (libart_renderer_type) {
- DiaRenderer *renderer = g_object_new(libart_renderer_type, NULL);
- g_object_set (renderer,
- "transform", dia_transform_new (&ddisp->visible, &ddisp->zoom_factor),
- NULL);
- return renderer;
- } else {
- /* we really should not come here but instead disable the menu command earlier */
- message_warning (_("No anti-aliased renderer found"));
- /* fallback: built-in libart renderer */
- return new_gdk_renderer (ddisp);
- }
}
+
+ /* we really should not come here but instead disable the menu command earlier */
+ message_warning (_("No anti-aliased renderer found"));
+ /* fallback: built-in libart renderer */
+ return new_gdk_renderer (ddisp);
}
void
Modified: trunk/plug-ins/libart/dialibartrenderer.c
==============================================================================
--- trunk/plug-ins/libart/dialibartrenderer.c (original)
+++ trunk/plug-ins/libart/dialibartrenderer.c Sun Mar 29 19:18:54 2009
@@ -1342,6 +1342,8 @@
static void
renderer_init (DiaLibartRenderer *renderer, gpointer g_class)
{
+ DiaRenderer *dia_renderer = DIA_RENDERER(renderer);
+
renderer->rgb_buffer = NULL;
renderer->line_width = 1.0;
@@ -1356,6 +1358,9 @@
renderer->highlight_color = NULL;
renderer->parent_instance.font = NULL;
+
+ /* lib/text.c does not use the interfaces */
+ dia_renderer->is_interactive = TRUE;
}
static void dia_libart_renderer_class_init (DiaLibartRendererClass *klass);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]