dia r4281 - in trunk: . objects/standard



Author: hans
Date: Sun Feb 15 16:45:22 2009
New Revision: 4281
URL: http://svn.gnome.org/viewvc/dia?rev=4281&view=rev

Log:
2009-02-15  Hans Breuer  <hans breuer org>

	* objects/standard/outline.c objects/standard/standard.c : pollute with
	#ifdef HAVE_CAIRO, otherwise Dia won't start when built --without-cairo
	( Couldn't find standard objects ... )



Modified:
   trunk/ChangeLog
   trunk/objects/standard/outline.c
   trunk/objects/standard/standard.c

Modified: trunk/objects/standard/outline.c
==============================================================================
--- trunk/objects/standard/outline.c	(original)
+++ trunk/objects/standard/outline.c	Sun Feb 15 16:45:22 2009
@@ -34,7 +34,9 @@
 
 #include "tool-icons.h"
 
+#ifdef HAVE_CAIRO
 #include <cairo.h>
+
 #ifdef CAIRO_HAS_SVG_SURFACE 
 #include <cairo-svg.h>
 #endif
@@ -57,8 +59,8 @@
   
   Handle handles[NUM_HANDLES];
   /* calculated data */
-  Point ink_rect[4];
-  cairo_path_t *path;
+  Point ink_rect[4];
+  cairo_path_t *path;
   struct _Matrix
   {
     real xx;
@@ -224,14 +226,14 @@
   { "show_background", PROP_TYPE_BOOL, offsetof(Outline, show_background) },
   { NULL, 0, 0 }
 };
-/* empty write function */
+/* empty write function */
 static cairo_status_t
 write_nul (void                *closure,
            const unsigned char *data,
 	   unsigned int	        length)
 {
   return CAIRO_STATUS_SUCCESS;
-}
+}
 /*! Not in the object interface but still required */
 static void
 outine_update_handles(Outline *outline)
@@ -250,7 +252,7 @@
 outline_update_data (Outline *outline)
 {
   DiaObject *obj = &outline->object;
-  /* calculate the ink_rect from two points and the given rotation */
+  /* calculate the ink_rect from two points and the given rotation */
   cairo_t *cr;
   cairo_surface_t *surface;
   cairo_text_extents_t extents;
@@ -319,7 +321,7 @@
   cairo_rotate (cr, 0.0);
   outline->path = cairo_copy_path (cr);
   /* the cairo context is only used in this fuinction */
-  cairo_destroy (cr);
+  cairo_destroy (cr);
 }
 static void 
 outline_draw(Outline *outline, DiaRenderer *renderer)
@@ -422,7 +424,7 @@
   }
   /* the last one, if there is one */
   if (i - n - 1 > 0)
-    DIA_RENDERER_GET_CLASS (renderer)->draw_bezier (renderer, &pts[n], i - n - 1, &outline->line_color);
+    DIA_RENDERER_GET_CLASS (renderer)->draw_bezier (renderer, &pts[n], i - n - 1, &outline->line_color);
 }
 /* returning used to crash Dia, the method needed to be NULL if there is nothing to do */
 static DiaMenu *
@@ -525,7 +527,7 @@
 outline_destroy (Outline *outline)
 {
   if (outline->path)
-    cairo_path_destroy (outline->path);
+    cairo_path_destroy (outline->path);
   g_free (outline->name);
   object_destroy(&outline->object);
   /* but not the object itself? */
@@ -536,4 +538,5 @@
 {
   outine_update_handles (outline);
 }
-
+
#endif /* HAVE_CAIRO */
+

Modified: trunk/objects/standard/standard.c
==============================================================================
--- trunk/objects/standard/standard.c	(original)
+++ trunk/objects/standard/standard.c	Sun Feb 15 16:45:22 2009
@@ -56,9 +56,12 @@
   object_register_type(_bezierline_type);
   object_register_type(_textobj_type);
   object_register_type(_image_type);
+#ifdef HAVE_CAIRO
   object_register_type(_outline_type);
+#endif
   object_register_type(_polygon_type);
   object_register_type(_beziergon_type);
 
   return DIA_PLUGIN_INIT_OK;
 }
+



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