Mercurial > MadButterfly
comparison src/shape_text.c @ 822:586e50f82c1f
Unify coding style tag for emacs and vim.
author | Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com> |
---|---|
date | Tue, 14 Sep 2010 01:08:39 +0800 |
parents | ba64f928542b |
children | a8d20bc8ce40 |
comparison
equal
deleted
inserted
replaced
821:bfdc82bbd6e4 | 822:586e50f82c1f |
---|---|
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- | |
2 // vim: sw=4:ts=8:sts=4 | |
1 #include <stdio.h> | 3 #include <stdio.h> |
2 #include <stdlib.h> | 4 #include <stdlib.h> |
3 #include <string.h> | 5 #include <string.h> |
4 #include <math.h> | 6 #include <math.h> |
5 #include "mb_graph_engine.h" | 7 #include "mb_graph_engine.h" |
63 text->shape.free = sh_text_free; | 65 text->shape.free = sh_text_free; |
64 text->layout = NULL; | 66 text->layout = NULL; |
65 text->attrs = attrs; | 67 text->attrs = attrs; |
66 text->align = TEXTALIGN_START; | 68 text->align = TEXTALIGN_START; |
67 text->w = text->h = 0; | 69 text->w = text->h = 0; |
68 | 70 |
69 rdman_shape_man(rdman, (shape_t *)text); | 71 rdman_shape_man(rdman, (shape_t *)text); |
70 | 72 |
71 return (shape_t *)text; | 73 return (shape_t *)text; |
72 } | 74 } |
73 | 75 |
220 PangoRectangle extents; | 222 PangoRectangle extents; |
221 co_aix poses[2][2]; | 223 co_aix poses[2][2]; |
222 int r; | 224 int r; |
223 | 225 |
224 text = (sh_text_t *)shape; | 226 text = (sh_text_t *)shape; |
225 | 227 |
226 text->d_font_size = coord_trans_size(shape->coord, text->font_size); | 228 text->d_font_size = coord_trans_size(shape->coord, text->font_size); |
227 | 229 |
228 coord = sh_get_coord(shape); | 230 coord = sh_get_coord(shape); |
229 canvas = _coord_get_canvas(coord); | 231 canvas = _coord_get_canvas(coord); |
230 sh_text_P_generate_layout(text, (mbe_t *)canvas); | 232 sh_text_P_generate_layout(text, (mbe_t *)canvas); |
231 | 233 |
232 x = text->x; | 234 x = text->x; |