]> granicus.if.org Git - graphviz/commitdiff
node size problem is solved for good
authorarif <devnull@localhost>
Wed, 13 May 2009 20:10:07 +0000 (20:10 +0000)
committerarif <devnull@localhost>
Wed, 13 May 2009 20:10:07 +0000 (20:10 +0000)
cmd/smyrna/gvprpipe.c
cmd/smyrna/main.c
cmd/smyrna/smyrna.vcproj
cmd/smyrna/smyrnadefs.h
cmd/smyrna/viewport.c

index e23360057c44bfb20b35f279b1359a1279afb52d..359574dd4c499fb11bdb49c139710ce5b4150b92 100644 (file)
@@ -143,7 +143,7 @@ int cgraph_write_wrapper(void *chan, char *str)
    DWORD dwWritten; 
    BOOL bSuccess = FALSE;
  
-    bSuccess = WriteFile(SmyrnaToGvprWr, str, strlen(str), &dwWritten, NULL);
+    bSuccess = WriteFile(SmyrnaToGvprWr, str, (DWORD)strlen(str), &dwWritten, NULL);
   if ( ! bSuccess ) return 0; 
   return dwWritten;
 } 
index 4f3f689407e7420d863983c0c02544fbec3f45bb..384ebe10e402869bbfdde8f85f5bc4b8228026c2 100755 (executable)
@@ -66,10 +66,11 @@ char*
 smyrnaPath (char* suffix)
 {
     char* buf;
-    assert (smyrnaDir);
 #ifdef _WIN32
     char* pathSep = "\\";
 #else
+
+       assert (smyrnaDir);
     char* pathSep = "/";
 #endif
 
@@ -212,7 +213,10 @@ int main(int argc, char *argv[])
     create_window(glconfig, gladewidget);
 
        change_cursor(GDK_TOP_LEFT_ARROW);
-       glutInit(&argc,argv);
+
+#ifndef WIN32  
+       glutInit(&argc,&argv);
+#endif
        gtk_main();
 
 
@@ -222,6 +226,5 @@ int main(int argc, char *argv[])
     g_free(package_data_dir);
 #endif
     g_free(package_locale_dir);
-    clear_viewport(view);
     return 0;
 }
index 193aac7d36379fbf6f20559ae35f57a019775813..62c310790b23c659d1dda3dc13ee2630fa6d9a41 100644 (file)
                        <File
                                RelativePath=".\glmotion.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="1"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\gltemplate.c"
                        <File
                                RelativePath=".\main.c"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               CompileAs="1"
+                                       />
+                               </FileConfiguration>
                        </File>
                        <File
                                RelativePath=".\md5.c"
index 0be00fc994a1389325f77e837c761767c0401e10..81e88274cff38059334def423098adb9960f57e5 100644 (file)
@@ -75,6 +75,7 @@
 
 #define SPHERE_SLICE_COUNT 6
 #define DOT_SIZE_CORRECTION_FAC 0.3
+#define HUGE_NUMBER    99999999999
 
 typedef enum { nodshapedot,nodeshapecircle} node_shape;
 typedef enum { leftmousebutton,rightmousebutton,thirdmousebutton} clicked_mouse_button;
@@ -318,6 +319,9 @@ typedef struct {
        graph_data Graphdata;
        int maxnodedegree;
        float maxedgelen;
+       float minedgelen;
+       float init_node_size;   //raster size of node
+       float init_zoom;
 } topview;
 
 enum {
@@ -386,6 +390,12 @@ typedef struct _fisheye_magnifier {
     int fisheye_distortion_fac;
 } fisheye_magnifier;
 
+typedef struct
+{
+       float x1,y1,x2,y2;
+
+}line;
+
 typedef struct _ViewInfo
 {
        /*view variables*/
@@ -543,9 +553,7 @@ typedef struct _ViewInfo
        char* glade_file;
        char* attr_file;
        int flush;
-
-
-
+       line interpol;
 } ViewInfo;
 
 extern ViewInfo *view;
index 67edfcbc25363fbaad03531f6d824a4b60df198c..ad09e3244574f6a2098da9f7fa6f77e65e59b4a1 100755 (executable)
@@ -33,6 +33,8 @@
 #include "memory.h"
 #include "topviewsettings.h"
 #include "md5.h"
+#include "gvprpipe.h"
+
 
 
   /* Forward declarations */
@@ -67,7 +69,8 @@ void clear_viewport(ViewInfo * view)
                cleartopview(view->Topview);
     if (view->graphCount) 
                agclose(view->g[view->activeGraph]);
-       init_viewport(view);
+
+//     init_viewport(view);
 }
 static void* get_glut_font(int ind)
 {
@@ -304,6 +307,7 @@ set_viewport_settings_from_template(ViewInfo * view, Agraph_t * g)
        view->labelshowedges=atoi(get_attribute_value ("showedgelabels", view, g));
        view->colschms=create_color_theme(atoi(get_attribute_value ("colortheme", view, g)));
 
+
        if (view->graphCount > 0)
                glClearColor(view->bgColor.R, view->bgColor.G, view->bgColor.B, view->bgColor.A);       //background color
 }
@@ -410,7 +414,6 @@ void init_viewport(ViewInfo * view)
     view->prevpanx = 0;
     view->prevpany = 0;
 
-
     view->zoom = -20;
     view->texture = 1;
     view->FontSize = 52;
@@ -1043,6 +1046,7 @@ void apply_gvpr(Agraph_t* g,char* prog)
 #ifdef WIN32   
        Agraph_t* a=exec_gvpr(prog,g);
 #endif
+       return 1;
 }
 float interpol(float minv,float maxv,float minc,float maxc,float x)
 {