Mercurial > MadButterfly
comparison src/shape_text.c @ 393:27774b93521e
Add sh_stext_t to implement a simple version of text shape.
- It is still under construction.
- It is supposed to be a simple, less dependency implementation.
- It is more less functional than sh_text_t.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 08 Jun 2009 07:04:20 +0800 |
parents | b391722bf20e |
children | 16116d84bc5e |
comparison
equal
deleted
inserted
replaced
392:ebf83a50e1e1 | 393:27774b93521e |
---|---|
44 | 44 |
45 text = (sh_text_t *)malloc(sizeof(sh_text_t)); | 45 text = (sh_text_t *)malloc(sizeof(sh_text_t)); |
46 if(text == NULL) | 46 if(text == NULL) |
47 return NULL; | 47 return NULL; |
48 | 48 |
49 | |
50 memset(text, 0, sizeof(sh_text_t)); | 49 memset(text, 0, sizeof(sh_text_t)); |
51 mb_obj_init(text, MBO_TEXT); | 50 mb_obj_init(text, MBO_TEXT); |
52 text->data = strdup(txt); | 51 text->data = strdup(txt); |
53 if(text->data == NULL) { | 52 if(text->data == NULL) { |
54 free(text); | 53 free(text); |