From: arif Date: Tue, 10 Mar 2009 22:58:49 +0000 (+0000) Subject: restructured glcomp X-Git-Tag: LAST_LIBGRAPH~32^2~2297 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c74fcd1c796f4fc584156d437892a6900568d460;p=graphviz restructured glcomp cleared more warnings --- diff --git a/lib/glcomp/glcomptexture.h b/lib/glcomp/glcomptexture.h index d2b76368a..91bddadbb 100644 --- a/lib/glcomp/glcomptexture.h +++ b/lib/glcomp/glcomptexture.h @@ -26,11 +26,9 @@ #include #include #include +#include "glcompdefs.h" + -typedef struct { - unsigned int id; - float w, h; -} glCompTexture; glCompTexture *glCompCreateTextureFromRaw(char *filename, int width, int height, int wrap); diff --git a/lib/glcomp/glpangofont.c b/lib/glcomp/glpangofont.c index ffd86292b..1c0478372 100644 --- a/lib/glcomp/glpangofont.c +++ b/lib/glcomp/glpangofont.c @@ -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; } }