]> granicus.if.org Git - graphviz/commitdiff
smyrna fixes
authorarif <devnull@localhost>
Wed, 11 Mar 2009 16:28:19 +0000 (16:28 +0000)
committerarif <devnull@localhost>
Wed, 11 Mar 2009 16:28:19 +0000 (16:28 +0000)
cmd/smyrna/gui/beacon.c
cmd/smyrna/gui/toolboxcallbacks.c
cmd/smyrna/gui/topviewsettings.c
cmd/smyrna/smyrna.vcproj
cmd/smyrna/topview.c
cmd/smyrna/topviewdata.c
cmd/smyrna/viewport.c
cmd/smyrna/viewportcamera.c
lib/glcomp/glCompTrackBar.c
lib/glcomp/glcomp.vcproj
lib/glcomp/glcompdefs.h

index 05ca2ebea1a31646bd2b0f7122ad28b715ff5b91..91a12ccff28738146e2b7deb30bac7b1b7a58beb 100644 (file)
@@ -89,7 +89,7 @@ int draw_node_hint_boxes()
        {
                draw_node_hintbox(view->Topview->picked_nodes[ind]->distorted_x,
                          view->Topview->picked_nodes[ind]->distorted_y,
-                                       view->Topview->picked_nodes[ind]->distorted_z+0.001,
+                                       view->Topview->picked_nodes[ind]->distorted_z+(float)0.001,
                                        (GLfloat) view->FontSizeConst,
                                     agnameof(view->Topview->picked_nodes[ind]->Node));
 /*     fontSize(fs);
index c610cc8fc72563dbee4b6031ef7d5f14e293aead..72a28559ef0d4e5879073bd3139b700750151b4b 100755 (executable)
@@ -73,7 +73,7 @@ void btnToolZoom_clicked(GtkWidget * widget, gpointer user_data)
 
 void btnToolZoomIn_clicked(GtkWidget * widget, gpointer user_data)
 {
-       view->zoom = view->zoom + ZOOM_STEP*GetOGLDistance(250);
+       view->zoom = view->zoom + (float)ZOOM_STEP*GetOGLDistance(250);
     if (view->zoom > MAX_ZOOM)
        view->zoom = (float) MAX_ZOOM;
     glexpose();
@@ -83,7 +83,7 @@ void btnToolZoomIn_clicked(GtkWidget * widget, gpointer user_data)
 void btnToolZoomOut_clicked(GtkWidget * widget, gpointer user_data)
 {
        view->FontSizeConst=GetOGLDistance(14);
-       view->zoom = view->zoom - ZOOM_STEP*GetOGLDistance(250);
+       view->zoom = view->zoom - (float)ZOOM_STEP*GetOGLDistance(250);
     if (view->zoom < MIN_ZOOM)
        view->zoom = MIN_ZOOM;
     expose_event(view->drawing_area, NULL, NULL);
index df548d9e2e1196a1a4e256765a7d09c920310bec..a35566bc997c5615fd85068760ed94824ac4f0c6 100644 (file)
@@ -163,7 +163,7 @@ static int set_scalebtn_widget_to_attribute(char *attribute, char *widget_name)
        buf = agget(view->default_attributes, attribute);
     if (buf) {
        value = (float) atof(buf);
-       gtk_range_set_value((GtkSpinButton *)
+       gtk_range_set_value((GtkRange *)
                                  glade_xml_get_widget(xml, widget_name),
                                  value);
        return 1;
@@ -196,7 +196,7 @@ static int get_combobox_widget_to_attribute(char *attribute, char *widget_name,
     char buf[25];
     float value;
 
-    value=
+    value=(float)
        gtk_combo_box_get_active((GtkComboBox *)
                                          glade_xml_get_widget(xml,
                                                       widget_name));
index 1dba92e6b00763d3e7e659f6948d7ab761994506..afe8e7d43d5cdf77e52434287b256ea010eebe7a 100644 (file)
                        />
                        <Tool
                                Name="VCCLCompilerTool"
+                               AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
                                Optimization="0"
                                AdditionalIncludeDirectories="&quot;$(SolutionDir)/lib/gvc&quot;;&quot;C:\gtk\include\libglade-2.0&quot;;&quot;$(SolutionDir)/lib/neatogen&quot;;&quot;$(SolutionDir)/lib/sparse&quot;;&quot;$(SolutionDir)/lib/topfish&quot;;&quot;C:\gtk\lib\gtkglext-1.0\include&quot;;&quot;C:\gtk\include\gtkglext-1.0\&quot;;C:\gtk\include\cairo;&quot;C:\gtk\include\atk-1.0&quot;;&quot;C:\gtk\lib\gtk-2.0\include\cairo&quot;;&quot;C:\gtk\lib\gtk-2.0\include&quot;;&quot;C:\gtk\include\gtk-2.0\&quot;;&quot;$(SolutionDir)/cmd/smyrna/gui&quot;;&quot;$(SolutionDir)/cmd/smyrna&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)/lib/glcomp&quot;;&quot;C:\gtk\lib\glib-2.0\include&quot;;&quot;C:\gtk\include\glib-2.0&quot;;&quot;C:\gtk\include\pango-1.0\&quot;;C:\gtk\include;&quot;$(SolutionDir)/lib/common&quot;;&quot;$(SolutionDir)/lib/cdt&quot;;&quot;$(SolutionDir)/lib/cgraph&quot;;&quot;$(SolutionDir)/windows\lib\ingraphs&quot;;&quot;$(SolutionDir)/lib/xdot&quot;"
-                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_TRIANGLE;HAVE_CONFIG_H;HAVE_GTS"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_TRIANGLE;HAVE_CONFIG_H;HAVE_GTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="3"
@@ -48,6 +49,7 @@
                                WarningLevel="3"
                                Detect64BitPortabilityProblems="true"
                                DebugInformationFormat="4"
+                               DisableSpecificWarnings="4995;4996"
                        />
                        <Tool
                                Name="VCManagedResourceCompilerTool"
                                RelativePath=".\gui\topviewsettings.c"
                                >
                        </File>
-                       <File
-                               RelativePath=".\trackball.c"
-                               >
-                       </File>
                        <File
                                RelativePath=".\tvnodes.c"
                                >
index 28955c5f54dc5e6ed2729fbe288bd8e8b5e58144..8480b23be1e5507bf3317f0b46f0b038929e142d 100755 (executable)
@@ -82,7 +82,7 @@ void preparetopview(Agraph_t * g, topview * t)
        int maxlabelsize=0;
        float maxedgelen,minedgelen,len,edgelength;
        maxedgelen=0;
-       minedgelen=99999999.00000;      //FIX ME if you have a giant graph or fix your graph
+       minedgelen=(float)99999999.00000;       //FIX ME if you have a giant graph or fix your graph
        edgelength=0;
 
     ind = 0;
@@ -202,7 +202,7 @@ void preparetopview(Agraph_t * g, topview * t)
                                t->Edges[ind2].y2 = b;
                                t->Edges[ind2].z2 = c;
                        }
-                       len=pow(pow((t->Edges[ind2].x2-t->Edges[ind2].x1),2)+pow((t->Edges[ind2].y2-t->Edges[ind2].y1),2),0.5);
+                       len=(float)pow(pow((t->Edges[ind2].x2-t->Edges[ind2].x1),2)+pow((t->Edges[ind2].y2-t->Edges[ind2].y1),2),0.5);
                        if (len > maxedgelen)
                                maxedgelen=len;
                        if (len < minedgelen)
@@ -271,7 +271,6 @@ void preparetopview(Agraph_t * g, topview * t)
 
 static float set_gl_dot_size(topview * t)
 {
-       GLfloat a;
        static float dotsize;
        static float prevdotsize;
        if (view->active_camera==-1)
@@ -281,7 +280,7 @@ static float set_gl_dot_size(topview * t)
 
 //     dotsize=dotsize * DOT_SIZE_CORRECTION_FAC;
        if (dotsize <=1.2)
-               dotsize=1.2;
+               dotsize=(float)1.2;
        glPointSize((GLfloat)dotsize);
        return dotsize;
 
@@ -645,13 +644,14 @@ static int draw_node_hint_boxes(void)
        fontColorA(view->fontset->fonts[view->fontset->activefont],0, 0, 1, 1);
 
 
-       fontDrawString(view->fontset->fonts[view->fontset->activefont],
+       fontDrawString(
+               view->fontset->fonts[view->fontset->activefont],
                       (view->Topview->picked_nodes[ind]->distorted_x),
                        (view->Topview->picked_nodes[ind]->
-                             distorted_y+fs+fs/5.0 ),
+                             distorted_y+fs+fs/(GLfloat)5.0 ),
                       fs *
                       (float)strlen(agnameof
-                             (view->Topview->picked_nodes[ind]->Node)) / 2.0,
+                             (view->Topview->picked_nodes[ind]->Node)) / (GLfloat)2.0,
                       agnameof(view->Topview->picked_nodes[ind]->Node));
     }
     return 1;
@@ -674,7 +674,7 @@ static int select_topview_node(topview_node * n)
                || 
                (view->mouse.button== rightmousebutton))        //single selection or right click (picking)
        {
-               float dist=pow((view->Selection.X-n->distorted_x),2)+pow((view->Selection.Y-n->distorted_y),2);
+               float dist=(float)pow((view->Selection.X-n->distorted_x),2)+(float)pow((view->Selection.Y-n->distorted_y),2);
                if ((view->Selection.node_distance==-1) ||(dist < view->Selection.node_distance))
                {
                                view->Selection.node_distance=dist;
@@ -837,8 +837,8 @@ int set_update_required(topview * t)
 
 float calculate_font_size(topview_node * v)
 {
-       double n;
-       n=(double)v->degree+(double)1.00;
+       float n;
+       n=(float)v->degree+(float)1.00;
        return n;
 
 }
@@ -877,11 +877,11 @@ static int draw_topview_label(topview_node * v, float zdepth)
                return 0;
 
 //     fs= 10;
-       fs= fs * 0.2;
+       fs= fs * (float)0.2;
 
 
 
-       fontSize(view->fontset->fonts[view->fontset->activefont],(int) fs);
+       fontSize(view->fontset->fonts[view->fontset->activefont],fs);
        if ((log((float) v->degree) * -0.6 * view->zoom) > 0)
            fontColorA(view->fontset->fonts[view->fontset->activefont],(float) log((double) v->degree + (double) 1),
                       view->penColor.G, view->penColor.B,
@@ -889,11 +889,11 @@ static int draw_topview_label(topview_node * v, float zdepth)
                       (float) -0.4 * (float) view->zoom);
        else
            fontColorA(view->fontset->fonts[view->fontset->activefont],(float) log((double) v->degree + (double) 1),
-                      view->penColor.G, view->penColor.B, 0.7);
+                      view->penColor.G, view->penColor.B, (float)0.7);
 
 //     fontColorA(0,0,0,1);
-       fontDrawString(view->fontset->fonts[view->fontset->activefont],(int) (v->distorted_x - ddx),
-                      (int) (v->distorted_y - ddy), (int) (fs * strlen(v->Label)*0.6),v->Label   );
+       fontDrawString(view->fontset->fonts[view->fontset->activefont],(v->distorted_x - ddx),
+                       (v->distorted_y - ddy),  (fs * strlen(v->Label)*(float)0.6),v->Label   );
 
        return 1;
     } else
@@ -1267,16 +1267,16 @@ static void menu_click_fisheye_magnifier(void *p)
 
 static void menu_click_zoom_minus(void *p)
 {
-    if ((view->zoom - ZOOM_STEP) > MIN_ZOOM)
-       view->zoom = view->zoom - ZOOM_STEP;
+    if ((view->zoom - (float)ZOOM_STEP) > (float)MIN_ZOOM)
+       view->zoom = view->zoom - (float)ZOOM_STEP;
     else
-       view->zoom = MIN_ZOOM;
+       view->zoom = (float)MIN_ZOOM;
 }
 
 static void menu_click_zoom_plus(void *p)
 {
-    if ((view->zoom + ZOOM_STEP) < MAX_ZOOM)
-       view->zoom = view->zoom + ZOOM_STEP;
+    if ((view->zoom + (float)ZOOM_STEP) < (float)MAX_ZOOM)
+       view->zoom = view->zoom + (float)ZOOM_STEP;
     else
        view->zoom = (float) MAX_ZOOM;
 
index 9dfddb9f99cebee6512e53adee58328f08d656c1..1ddc20e61acca30af1775f83ce5f986a8692d866 100644 (file)
@@ -15,6 +15,9 @@
 
 #include "topviewdata.h"
 #include "btree.h"
+#include "glcomppanel.h"
+#include "glcompbutton.h"
+
 #include <memory.h>
 
 static int validate_group_node(tv_node * TV_Node, char *regex_string)
@@ -85,7 +88,7 @@ int load_host_buttons(topview * t, Agraph_t * g, glCompSet * s)
     t->TopviewData->gtkhostcolor = N_GNEW(btncount, GtkColorButton *);
     t->TopviewData->gtkhostbtncount = btncount;
     if (btncount > 0) {
-       p = glCompPanelNew(25, 75, 165, 400);
+       p = glCompPanelNew(25, 75, 165, 400,scientific_y);
        p->data = 2;            //data panel
        p->color.R = (float) 0.80;
        p->color.B = (float) 0.2;
@@ -112,7 +115,7 @@ int load_host_buttons(topview * t, Agraph_t * g, glCompSet * s)
                                           (GLfloat) 1) * (GLfloat) 36,
                            (GLfloat) 150, (GLfloat) 35, agget(g,
                                                               hostbtncaption),
-                           '\0', 0, 0);
+                           '\0', 0, 0,scientific_y);
        b->color.R = (float) atof(agget(g, hostbtncolorR));
        b->color.G = (float) atof(agget(g, hostbtncolorG));
        b->color.B = (float) atof(agget(g, hostbtncolorB));
index 347afadcbee4c7d417bf9f6386f255cbf88b545e..aa3d989b244e30eb79e6a28dfb6a89fad8101a2b 100755 (executable)
@@ -225,7 +225,7 @@ set_viewport_settings_from_template(ViewInfo * view, Agraph_t * g)
     /*default line width */
     view->LineWidth =
        (float) atof(get_attribute_value("defaultlinewidth", view, g));
-    view->FontSize = atoi(get_attribute_value("defaultfontsize", view, g));
+    view->FontSize = (float)atof(get_attribute_value("defaultfontsize", view, g));
 
     view->topviewusermode = atoi(get_attribute_value("usermode", view, g));
     get_attribute_value("defaultmagnifierwidth", view, g);
@@ -390,7 +390,7 @@ void init_viewport(ViewInfo * view)
        view->total_frames=1500;
        view->frame_length=1;
        /*add a call back to the main()*/
-       g_timeout_add_full(G_PRIORITY_DEFAULT,100,gl_main_expose,NULL,NULL);
+       g_timeout_add_full((gint)G_PRIORITY_DEFAULT,(guint)100,gl_main_expose,NULL,NULL);
        view->Topview->topviewmenu = '\0';
        view->cameras='\0';;
        view->camera_count=0;
@@ -620,8 +620,8 @@ static char* create_xdot_for_graph(Agraph_t * graph, int keeppos)
 {
     static char buf[BUFSIZ];
     static char* cmd = buf;
-    static int buflen = BUFSIZ;
-    int len;
+    static size_t buflen = BUFSIZ;
+    size_t len;
     int r = 0;
     FILE *output_file;
     char* fix;
index c374d886bad1d776404f6ede66639f302765594e..c5e1a45c6ef98af6f3f33a333c58d98ef6c59f7f 100644 (file)
@@ -164,7 +164,8 @@ void attach_camera_widget(ViewInfo * view)
 #define        CAMERA_BUTTON_WIDTH             75
 
 
-    int ind, ind2, x, y;
+    int ind, ind2;
+       GLfloat x, y;
     char buf[256];
     glCompPanel *p;
     glCompButton *b;
index b0d9abfbb125ee3d064c03fb28d4a754b5c844c1..b3fd182f86c3a9bc64a3ff189bd9034ab7c329e7 100644 (file)
@@ -1,4 +1,7 @@
-#include "glCompTrackBar.h"
+#include "glcomptrackbar.h"
+#include "gltexfont.h"
+
+
 
 glCompTrackBar* glCompTrackBarNew(GLfloat x, GLfloat y, GLfloat w, GLfloat h,glCompOrientation orientation)
 {
index 1ab84b88ddf3b558e9bc896bcbb18d47319c7138..15f9898b0dbe94574afa2a28940f0ac3c37ad0ae 100644 (file)
@@ -40,7 +40,7 @@
                                Name="VCCLCompilerTool"
                                Optimization="0"
                                AdditionalIncludeDirectories="&quot;C:\gtk\lib\glib-2.0\include&quot;;&quot;C:\gtk\include\glib-2.0&quot;;&quot;C:\gtk\include\pango-1.0\&quot;;C:\gtk\include;&quot;$(SolutionDir)/lib/common&quot;;&quot;$(SolutionDir)/lib/cdt&quot;;&quot;$(SolutionDir)/lib/cgraph&quot;;&quot;$(SolutionDir)/lib/xdot&quot;"
-                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
+                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="3"
index c57d9e6bb15aab95f983ba8a00a756efe9338be3..826273a7fa3c6e8fae7c219cab83262c27b36820 100644 (file)
@@ -4,6 +4,7 @@
 #ifdef _WIN32
 #include "windows.h"
 #endif
+#include <stdlib.h>
 #include <stdio.h>
 #include <GL/gl.h>
 #include <GL/glu.h>