From: arif Date: Wed, 21 May 2008 17:52:25 +0000 (+0000) Subject: animation implemented X-Git-Tag: LAST_LIBGRAPH~32^2~4034 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b20cd7aa5ea037cfd039b12c184c0987ed8812f8;p=graphviz animation implemented colorinf problem exists --- diff --git a/cmd/smyrna/draw.c b/cmd/smyrna/draw.c index 40130b96b..f2dd4e7c1 100755 --- a/cmd/smyrna/draw.c +++ b/cmd/smyrna/draw.c @@ -783,16 +783,18 @@ void drawEllipse(float xradius, float yradius,int angle1,int angle2) } int draw_node_hintbox_gl_polygon(GLfloat x,GLfloat y,GLfloat fs,GLfloat pad,GLfloat z,GLfloat kts) { - kts=kts*1.25; - glBegin(GL_POLYGON); - glVertex3f(x-(fs/3)-fs , y+fs ,z); - glVertex3f(x-(fs/3)-fs ,y+2*fs+2*pad,z); - glVertex3f(x-(fs/3)-fs+fs*kts+2*pad,y+2*fs+2*pad,z); - glVertex3f(x-(fs/3)-fs+fs*kts+2*pad,y+fs,z); - glVertex3f(x-(fs/3)-fs , y+fs ,z); + float w; + kts=kts*(GLfloat)1.15; + w=fs*kts+2*pad; + glBegin(GL_POLYGON); //big rectangle + glVertex3f(x-w/(GLfloat)2.0 , y+fs ,z); + glVertex3f(x-w/(GLfloat)2.0 ,y+2*fs+2*pad,z); + glVertex3f(x+w/(GLfloat)2.0,y+2*fs+2*pad,z); + glVertex3f(x+w/(GLfloat)2.0,y+fs,z); + glVertex3f(x-w/(GLfloat)2.0 , y+fs ,z); glEnd(); - glBegin(GL_POLYGON); + glBegin(GL_POLYGON); //litle triangle glVertex3f(x,y,z); glVertex3f(x-(fs/3) , y+fs ,z); glVertex3f(x+fs/3,y+fs,z); @@ -803,15 +805,18 @@ int draw_node_hintbox_gl_polygon(GLfloat x,GLfloat y,GLfloat fs,GLfloat pad,GLfl } int draw_node_hintbox_gl_line(GLfloat x,GLfloat y,GLfloat fs,GLfloat pad,GLfloat z,GLfloat kts) { - kts=kts*1.25; + float w; + kts=kts*(GLfloat)1.15; + w=fs*kts+(GLfloat)2*pad; + glBegin(GL_LINE_STRIP); glVertex3f(x,y,z); - glVertex3f(x-(fs/3) , y+fs ,z); - glVertex3f(x-(fs/3)-fs , y+fs ,z); - glVertex3f(x-(fs/3)-fs ,y+2*fs+2*pad,z); - glVertex3f(x-(fs/3)-fs+fs*kts+2*pad,y+2*fs+2*pad,z); - glVertex3f(x-(fs/3)-fs+fs*kts+2*pad,y+fs,z); - glVertex3f(x+fs/3,y+fs,z); + glVertex3f(x-(fs/(GLfloat)3) , y+fs ,z); + glVertex3f(x-w/(GLfloat)2.0 , y+fs ,z); + glVertex3f(x-w/(GLfloat)2.0 ,y+2*fs+2*pad,z); + glVertex3f(x+w/(GLfloat)2.0,y+2*fs+2*pad,z); + glVertex3f(x+w/(GLfloat)2.0,y+fs,z); + glVertex3f(x+fs/(GLfloat)3,y+fs,z); glVertex3f(x,y,z); glEnd(); return 1; diff --git a/cmd/smyrna/glexpose.c b/cmd/smyrna/glexpose.c index 41f57181d..9251ffe39 100644 --- a/cmd/smyrna/glexpose.c +++ b/cmd/smyrna/glexpose.c @@ -147,7 +147,12 @@ int glexpose_drawgraph(ViewInfo * view) if(!view->Topview->is_top_fisheye) drawTopViewGraph(view->g[view->activeGraph]); //view->Topview style dots and straight lines else - drawtopologicalfisheye(view->Topview); + { +// drawtopologicalfisheye(view->Topview); + drawtopologicalfisheye2(view->Topview); + + + } glCompSetDraw(view->Topview->topviewmenu); } else diff --git a/cmd/smyrna/gltemplate.c b/cmd/smyrna/gltemplate.c index 98da0d569..5a47ca1b0 100755 --- a/cmd/smyrna/gltemplate.c +++ b/cmd/smyrna/gltemplate.c @@ -367,7 +367,6 @@ static gboolean motion_notify_event(GtkWidget * widget, /* float h = (float)widget->allocation.height; */ float x = (float) event->x; float y = (float) event->y; - char buf[50]; gboolean redraw = FALSE; diff --git a/cmd/smyrna/gui/topviewsettings.c b/cmd/smyrna/gui/topviewsettings.c index 53e0bf346..8cdc4a29b 100644 --- a/cmd/smyrna/gui/topviewsettings.c +++ b/cmd/smyrna/gui/topviewsettings.c @@ -280,6 +280,7 @@ int update_graph_from_settings(Agraph_t * g) "settingsChkBox5-3", g); + get_checkbox_widget_to_attribute("usermode", "settingsChkBox10", g); get_checkbox_widget_to_attribute("nodesizewithdegree", "settingsChkBox11", g); diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h index be42569ef..d7ac51ea1 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -64,7 +64,7 @@ #define MAX_ZOOM -0.000033 #define MIN_ZOOM -1500.00000 -#define ZOOM_STEP 5 +#define ZOOM_STEP 0.5 #define DEG2RAD G_PI/180 #define UNHIGHLIGHTED_ALPHA 0.3