smyrna fonts improvement
authorarif <devnull@localhost>
Wed, 1 Apr 2009 20:19:23 +0000 (20:19 +0000)
committerarif <devnull@localhost>
Wed, 1 Apr 2009 20:19:23 +0000 (20:19 +0000)
cmd/smyrna/glexpose.c
cmd/smyrna/gltemplate.c
cmd/smyrna/topview.c
graphviz.sln
lib/glcomp/glcomp.vcproj
lib/glcomp/glcompbutton.c
lib/glcomp/glcomptext.c

index 5a7bed5f2889d6b2e5373b99ac7d690e7ee7fb32..4bccdb60c31908b7677edaf447a0b8db91ceaddc 100644 (file)
@@ -102,6 +102,9 @@ int glexpose_main(ViewInfo * view)
     draw_selection_box(view);
     drawBorders(view);
        drawRotatingTools();
+//             draw_stuff();
+
+
 
 //     drawtestpoly();
        /*DEBUG*/
@@ -173,7 +176,8 @@ void glexpose_grid(ViewInfo * view)
 */
 int glexpose_drawgraph(ViewInfo * view)
 {
-    if (view->activeGraph > -1) 
+    
+       if (view->activeGraph > -1) 
        {
                if (GD_TopView(view->g[view->activeGraph])) 
                {
@@ -183,16 +187,18 @@ int glexpose_drawgraph(ViewInfo * view)
                        {
                                drawtopologicalfisheye(view->Topview);
                        }
-                       glCompSetDraw(view->Topview->topviewmenu);
+//                     glCompDrawBegin();
 //                     OtkUpdateCheck();
-       //              OtkDisplayFunct();
+//                     glCompDrawEnd();
+                       glCompSetDraw(view->Topview->topviewmenu);
+//                     OtkDrawAll_scene( 0);
 
                }
                else
                        drawGraph(view->g[view->activeGraph]);  //xdot based drawing functions
                return 1;
     }
-    return 0;
+       return 0;
 }
 
 void drawRotatingTools(void)
index 89faaf3d1d22eafbe2ae98769f1ecc0f23206040..f60491f700260196f63f6d70de79cec093f65752 100755 (executable)
@@ -144,7 +144,9 @@ static void realize(GtkWidget * widget, gpointer data)
        return;
 
     glClearColor(view->bgColor.R, view->bgColor.G, view->bgColor.B, view->bgColor.A);  //background color
-    glClearDepth(1.0);
+       glClearDepth(1.0);
+       glClear(GL_COLOR_BUFFER_BIT);
+
 
     glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
     glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
index 62c5248008411fb9f2d584c92a2c02495e7f3a75..d0c722d67a8c81d575b32f90b56fb4394c71ced4 100755 (executable)
@@ -53,6 +53,7 @@ static int update_topview_node_from_cgraph(topview_node * Node);
 static int get_color_from_edge(topview_edge * e);
 static int draw_node_hint_boxes(void);
 static int pick_node(topview_node * n);
+extern OtkWidget* OtkOuterWindow;
 
 
 void cleartopview(topview * t)
@@ -82,9 +83,7 @@ void preparetopview(Agraph_t * g, topview * t)
        int maxlabelsize=0;
        float maxedgelen,minedgelen,len,edgelength;
 
-//     OtkInitWindow( 700, 500, NULL, NULL );
-//     OtkMakeButton( OtkOuterWindow, 10.0, 10.0, 80.0, 80.0, "Hello World !", 0, 0 );
-//     OtkMainLoop();
+
 
 
 
@@ -868,8 +867,6 @@ static int draw_topview_label(topview_node * v, float zdepth)
        && (v->distorted_y / view->zoom * -1 < view->clipY2)) 
        {
                fs=calculate_font_size(v);
-               if (v->degree==0)
-                       printf("haha\n");
        
 
 /*             fs = (v->degree ==1) ? 
index 1bde76cf74823b38ca27a320b0c7c697828e1b58..fc653bf6e0aee821b78257057eef8d1aec989d55 100644 (file)
@@ -184,6 +184,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "lib\libpng\1.2.24
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvplugin_gdiplus", "plugin\gdiplus\gvplugin_gdiplus.vcproj", "{0F4D5D8F-F4D6-4A5D-97E0-9B482257F493}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "otk", "lib\otk_lib\otk.vcproj", "{343EB043-1F93-4F40-989D-FA309E4668AF}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -394,6 +396,10 @@ Global
                {0F4D5D8F-F4D6-4A5D-97E0-9B482257F493}.Debug|Win32.Build.0 = Debug|Win32
                {0F4D5D8F-F4D6-4A5D-97E0-9B482257F493}.Release|Win32.ActiveCfg = Release|Win32
                {0F4D5D8F-F4D6-4A5D-97E0-9B482257F493}.Release|Win32.Build.0 = Release|Win32
+               {343EB043-1F93-4F40-989D-FA309E4668AF}.Debug|Win32.ActiveCfg = Debug|Win32
+               {343EB043-1F93-4F40-989D-FA309E4668AF}.Debug|Win32.Build.0 = Debug|Win32
+               {343EB043-1F93-4F40-989D-FA309E4668AF}.Release|Win32.ActiveCfg = Release|Win32
+               {343EB043-1F93-4F40-989D-FA309E4668AF}.Release|Win32.Build.0 = Release|Win32
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index 469cf7e23c1a5424d0d340d21bd24d4ecffdeabf..4f39ef07101e4924580ac28e3fb72a304b2dd792 100644 (file)
                                RelativePath=".\glpangofont.c"
                                >
                        </File>
+                       <File
+                               RelativePath=".\glutfonts.c"
+                               >
+                       </File>
                        <File
                                RelativePath=".\glutils.c"
                                >
index 996f0a2b4228e9dbbb3d740f91db4fa1769422e3..8e9785a4e54971d5c9747d4cd5ccdf789f26527c 100644 (file)
@@ -15,6 +15,7 @@
 #include "glcomptexture.h"
 #include "glcomptext.h"
 #include <string.h>
+#include "glut.h"
 
 glCompButton *glCompButtonNew(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
                              char *caption, char *glyphfile,
@@ -197,10 +198,13 @@ int glCompDrawButton(glCompButton * p)
             p->fontsize) / (GLfloat) 2.0 + p->pos.y + p->thickness;
        p->font->fontheight=p->fontsize;
 //              fontColorA (p->fontcolor.R,p->fontcolor.B,p->fontcolor.G,p->fontcolor.A);
-       fontColor(p->font,0, 0, 0, 1);
-       glprintf(p->font,(GLfloat) fontx, (GLfloat) fonty,
+       glColor4f(0, 0, 0, 1);
+/*     glprintf(p->font,(GLfloat) fontx, (GLfloat) fonty,
                        (p->fontsize *(GLfloat) strlen(p->caption) *
-                             GLCOMPSET_FONT_SIZE_FACTOR), p->caption);
+                             GLCOMPSET_FONT_SIZE_FACTOR), p->caption);*/
+//    glTranslatef((GLfloat) fontx,(GLfloat) fonty,p->bevel);
+       glRasterPos3f(fontx,fonty,p->bevel + GLCOMPSET_BEVEL_DIFF * 3);
+         print_bitmap_string(GLUT_BITMAP_HELVETICA_12,p->caption);
     }
     //put glyph
     else {
index 311c87c9198355715ca55bdc21d7cbae5ec4bd65..f351c436d4ffcd6c8d0c3b442255583d662d7e15 100644 (file)
@@ -13,6 +13,8 @@
 #include "glcomptext.h"
 #include "glpangofont.h"
 #include "memory.h"
+#include "glut.h"
+
 void init_gl_vars(glCompText* f)
 {
 
@@ -70,7 +72,8 @@ void
 glprintf (glCompText* font, GLfloat xpos, GLfloat ypos, 
     GLfloat width, char *bf)
 {
-    int vPort[4];
+
+       int vPort[4];
        GLfloat size = font->fontheight;
        GLfloat x = xpos;
        GLfloat y = ypos;
@@ -79,7 +82,12 @@ glprintf (glCompText* font, GLfloat xpos, GLfloat ypos,
        int maxcharCount;
        char* tempC;
        GLfloat charGap;
+       glColor4f (font->color.R,font->color.G,font->color.B,font->color.A);
+       glRasterPos3f(xpos,ypos,1);
+         print_bitmap_string(GLUT_BITMAP_HELVETICA_12,bf);     
+       return ;
        
+
        glGetIntegerv (GL_VIEWPORT, vPort);
 
        init_gl_vars(font);