]> granicus.if.org Git - graphviz/commitdiff
animation implemented
authorarif <devnull@localhost>
Wed, 21 May 2008 17:52:25 +0000 (17:52 +0000)
committerarif <devnull@localhost>
Wed, 21 May 2008 17:52:25 +0000 (17:52 +0000)
colorinf problem exists

cmd/smyrna/draw.c
cmd/smyrna/glexpose.c
cmd/smyrna/gltemplate.c
cmd/smyrna/gui/topviewsettings.c
cmd/smyrna/smyrnadefs.h

index 40130b96b5a1a9a70f778a62654a8599a503a179..f2dd4e7c11ed8bfe4027356fcd0cf16b39643c7e 100755 (executable)
@@ -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;
index 41f57181dcf42ad1496044fd1459165b96712eac..9251ffe39e1b9a6138092edd8c9e36d0bfb99286 100644 (file)
@@ -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
index 98da0d569a1f8b989603fc98ad6bbffcb164c95e..5a47ca1b08b55820326b8bc5c485ddff4553486e 100755 (executable)
@@ -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;
index 53e0bf346c63c1a123ce6d83793d762856d9aeeb..8cdc4a29bec0ca5d8a4f651b2a396b62eafaa021 100644 (file)
@@ -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);
index be42569ef96344bbe5251796aedfd35ce8e4fd23..d7ac51ea11271093efde9e6ef6c46cfe42f76707 100644 (file)
@@ -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