[dia] Fix blurred rendering with cairo



commit 773b2bdbf5297f2ce76cd19ab0961c6876dc6d54
Author: Hans Breuer <hans breuer org>
Date:   Fri Sep 10 15:52:29 2010 +0200

    Fix blurred rendering with cairo
    
    By using cairo_set_antialias (renderer->cr, CAIRO_ANTIALIAS_NONE);
    e.g. UML diagrams are looking much better now, previously the class
    box appearance was quite blurred. Despite the name cairo still
    renders antialiased, but maintains sharp lines when it can.

 plug-ins/cairo/diacairo-renderer.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/cairo/diacairo-renderer.c b/plug-ins/cairo/diacairo-renderer.c
index 1d8b7df..7fbb786 100644
--- a/plug-ins/cairo/diacairo-renderer.c
+++ b/plug-ins/cairo/diacairo-renderer.c
@@ -88,6 +88,8 @@ begin_render(DiaRenderer *self)
 
   cairo_scale (renderer->cr, renderer->scale, renderer->scale);
   cairo_translate (renderer->cr, -renderer->dia->extents.left, -renderer->dia->extents.top);
+  /* no more blurred UML diagrams */
+  cairo_set_antialias (renderer->cr, CAIRO_ANTIALIAS_NONE);
 
   /* clear background */
   if (renderer->with_alpha)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]