Mercurial > MadButterfly
comparison examples/dynamic/text.c @ 289:13ce87b6dbf5
Fix bug of sh_text_t that do not update it-self after changes.
- It is wrong to compute bounding box.
- location of left-top corner is (text->d_x, text->d_y)
not (text->x, text->y).
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 31 Jan 2009 18:28:50 +0800 |
parents | 22d771e1b710 |
children | 137a73822d48 |
comparison
equal
deleted
inserted
replaced
288:d5327265da1e | 289:13ce87b6dbf5 |
---|---|
40 sh_text_set_text(text,"This is 0"); | 40 sh_text_set_text(text,"This is 0"); |
41 } else { | 41 } else { |
42 sh_text_set_text(text,"This is 1"); | 42 sh_text_set_text(text,"This is 1"); |
43 } | 43 } |
44 rdman_shape_changed(MBAPP_RDMAN(myApp), text); | 44 rdman_shape_changed(MBAPP_RDMAN(myApp), text); |
45 #if 0 | |
46 /* Removed! | |
47 * X_MB_handle_connection() will invoke it automatically. | |
48 */ | |
45 rdman_redraw_changed(MBAPP_RDMAN(myApp)); | 49 rdman_redraw_changed(MBAPP_RDMAN(myApp)); |
50 #endif | |
46 } | 51 } |
47 | 52 |
48 int main(int argc, char * const argv[]) { | 53 int main(int argc, char * const argv[]) { |
49 subject_t *subject; | 54 subject_t *subject; |
50 mb_button_t *b; | 55 mb_button_t *b; |