]> granicus.if.org Git - graphviz/commitdiff
restructured glcomp
authorarif <devnull@localhost>
Tue, 10 Mar 2009 22:58:49 +0000 (22:58 +0000)
committerarif <devnull@localhost>
Tue, 10 Mar 2009 22:58:49 +0000 (22:58 +0000)
cleared more warnings

lib/glcomp/glcomptexture.h
lib/glcomp/glpangofont.c

index d2b76368ab6739f5de51495cf45c17dae394bc87..91bddadbb37e8dc73228807760377f9a14aa4afe 100644 (file)
 #include <stdio.h>
 #include <GL/gl.h>
 #include <GL/glu.h>
+#include "glcompdefs.h"
+
 
-typedef struct {
-    unsigned int id;
-    float w, h;
-} glCompTexture;
 
 glCompTexture *glCompCreateTextureFromRaw(char *filename, int width,
                                          int height, int wrap);
index ffd86292b2a46fe973d50e4ffd947926e37935a2..1c047837246ce6e13324193b91d8d9a00607ef28 100644 (file)
@@ -58,7 +58,7 @@ static PangoLayout *  get_pango_layout (cairo_t       *cr,
 
        desc = pango_font_description_from_string(fontdescription);
 //     pango_font_description_set_family(desc, "CENTAUR.TTF");
-    pango_font_description_set_size (desc, DEFAULT_FONT_SIZE * PANGO_SCALE/2.0);
+    pango_font_description_set_size (desc, (gint)(DEFAULT_FONT_SIZE * PANGO_SCALE/2.0));
 //     pango_font_description_set_style    (desc,PANGO_STYLE_ITALIC);
 
     if (! pango_parse_markup (markup_text, -1, '\0', &attr_list, &text, NULL, NULL))
@@ -112,7 +112,7 @@ int create_font_file(char* fontdescription,char* fontfile,float gw,float gh)
        if(file_exists(fontfile))       //checking if font file has already been created
                return 0;
        //create the right size canvas for character set
-       surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,(float)ncolumns*gw,gh*(float)ncolumns);
+       surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,(int)((float)ncolumns*gw),(int)(gh*(float)ncolumns));
        cr = cairo_create(surface);
        //draw a rectangle with same size of canvas
        cairo_rectangle(cr, 0, 0,(float)ncolumns*gw,gh*(float)ncolumns);
@@ -132,10 +132,10 @@ int create_font_file(char* fontdescription,char* fontfile,float gw,float gh)
                cairo_move_to(cr,X,Y);
                layout = get_pango_layout (cr,buf,fontdescription, &width, &height);
                pango_cairo_show_layout(cr, layout);
-               X=X+gw;
+               X=X+(int)gw;
                if (counter==ncolumns)
                {
-                       X=0;Y=Y+gh;
+                       X=0;Y=Y+(int)gh;
                        counter=0;
                }
        }