From: arif Date: Wed, 13 May 2009 20:10:07 +0000 (+0000) Subject: node size problem is solved for good X-Git-Tag: LAST_LIBGRAPH~32^2~2089 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6800824513ac59acea2e327f9eb7a686c2f8a3bb;p=graphviz node size problem is solved for good --- diff --git a/cmd/smyrna/gvprpipe.c b/cmd/smyrna/gvprpipe.c index e23360057..359574dd4 100644 --- a/cmd/smyrna/gvprpipe.c +++ b/cmd/smyrna/gvprpipe.c @@ -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; } diff --git a/cmd/smyrna/main.c b/cmd/smyrna/main.c index 4f3f68940..384ebe10e 100755 --- a/cmd/smyrna/main.c +++ b/cmd/smyrna/main.c @@ -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; } diff --git a/cmd/smyrna/smyrna.vcproj b/cmd/smyrna/smyrna.vcproj index 193aac7d3..62c310790 100644 --- a/cmd/smyrna/smyrna.vcproj +++ b/cmd/smyrna/smyrna.vcproj @@ -344,6 +344,14 @@ + + + + + + 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) {