ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.6 by root, Sun Apr 9 00:06:51 2006 UTC vs.
Revision 1.7 by root, Sun Apr 9 00:09:50 2006 UTC

35 RETVAL = (char *)glGetString (GL_EXTENSIONS); 35 RETVAL = (char *)glGetString (GL_EXTENSIONS);
36 OUTPUT: 36 OUTPUT:
37 RETVAL 37 RETVAL
38 38
39void 39void
40font_render (SV *text_, int height) 40font_render (SV *text_, int height = 10)
41 PPCODE: 41 PPCODE:
42{ 42{
43 STRLEN textlen; 43 STRLEN textlen;
44 char *text = SvPVutf8 (text_, textlen); 44 char *text = SvPVutf8 (text_, textlen);
45 SV *retval; 45 SV *retval;
46 int w, h; 46 int w, h;
47 FT_Bitmap bitmap; 47 FT_Bitmap bitmap;
48 PangoLayout *layout; 48 PangoLayout *layout;
49 PangoFontDescription *font = pango_context_get_font_description (context); 49 PangoFontDescription *font = pango_context_get_font_description (context);
50 pango_font_description_set_absolute_size (font, 40 * PANGO_SCALE); 50 pango_font_description_set_absolute_size (font, height * PANGO_SCALE);
51 51
52 layout = pango_layout_new (context); 52 layout = pango_layout_new (context);
53 pango_layout_set_markup (layout, text, textlen); 53 pango_layout_set_markup (layout, text, textlen);
54 pango_layout_get_pixel_size (layout, &w, &h); 54 pango_layout_get_pixel_size (layout, &w, &h);
55 55

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines