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

exporting to DXF format



Hello list,

I made two patches to correct exporting to DXF files.

1. The first character of DXF files which exported from dia
  is alphabet 'O'. I believe that the correct character is number '0'. 

--- plug-ins/dxf/dxf-export.c.orig  2004-07-19 22:25:28.000000000 +0900
+++ plug-ins/dxf/dxf-export.c   2004-07-19 22:25:28.000000000 +0900
@@ -511,7 +511,7 @@
     renderer->file = file;
     
     /* write layer description */
-    fprintf(file,"O\nSECTION\n2\nTABLES\n");
+    fprintf(file,"0\nSECTION\n2\nTABLES\n");
     for (i=0; i<data->layers->len; i++) {
       layer = (Layer *) g_ptr_array_index(data->layers, i);
       fprintf(file,"0\nLAYER\n2\n%s\n",layer->name);


   This is same patch to which I added to #147620 on gnome-bugzilla
  one week ago.

2. A condition is opposite to really should be.
  Maybe this affect also some other format, not only for DXF.

--- lib/diarenderer.c.orig      2004-07-23 20:05:13.000000000 +0900
+++ lib/diarenderer.c   2004-07-23 19:10:26.000000000 +0900
@@ -748,7 +748,7 @@
   DiaRendererClass *klass = DIA_RENDERER_GET_CLASS (renderer);
   int i;
 
-  g_return_if_fail (1 > num_points);
+  g_return_if_fail (1 < num_points);
 
   for (i = 0; i < num_points - 1; i++)
     klass->draw_line (renderer, &points[i+0], &points[i+1], color);


  Thanks,
--------------------------------------------------
    Takeshi Hamasaki
    E-mail: hma syd odn ne jp


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK