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.45 by root, Mon Apr 17 09:33:11 2006 UTC vs.
Revision 1.46 by root, Mon Apr 17 19:20:59 2006 UTC

47{ 47{
48 /* use a random scale factor to account for unknown descenders, 0.8 works 48 /* use a random scale factor to account for unknown descenders, 0.8 works
49 * reasonably well with bitstream vera 49 * reasonably well with bitstream vera
50 */ 50 */
51 PangoFontDescription *font = pango_context_get_font_description (context); 51 PangoFontDescription *font = pango_context_get_font_description (context);
52 pango_font_description_set_absolute_size (font, self->base_height * (PANGO_SCALE * 8 / 10)); 52
53 int height = self->base_height * (PANGO_SCALE * 8 / 10);
54
55 if (pango_font_description_get_size (font) != height)
56 {
57 pango_font_description_set_absolute_size (font, height);
58 pango_layout_context_changed (self->pl);
59 }
53} 60}
54 61
55static void 62static void
56layout_get_pixel_size (CFClient__Layout self, int *w, int *h) 63layout_get_pixel_size (CFClient__Layout self, int *w, int *h)
57{ 64{
391 char *text = SvPVutf8 (text_, textlen); 398 char *text = SvPVutf8 (text_, textlen);
392 399
393 pango_layout_set_markup (self->pl, text, textlen); 400 pango_layout_set_markup (self->pl, text, textlen);
394} 401}
395 402
403SV *
404get_text (CFClient::Layout self)
405 CODE:
406 RETVAL = newSVpv (pango_layout_get_text (self), 0);
407 SvUTF8_on (RETVAL);
408 OUTPUT:
409 RETVAL
410
396void 411void
397set_height (CFClient::Layout self, int base_height) 412set_height (CFClient::Layout self, int base_height)
398 CODE: 413 CODE:
399 self->base_height = base_height; 414 self->base_height = base_height;
400 415

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines