src/text.c

changeset 292
25931abee09f
parent 290
2eb3813562e7
child 296
f4f7886f10f0
equal deleted inserted replaced
291:5506cd3efe86 292:25931abee09f
154 text->color = ASC_RGB(1, 1, 1); 154 text->color = ASC_RGB(1, 1, 1);
155 } else { 155 } else {
156 text->color = args.color; 156 text->color = args.color;
157 } 157 }
158 if (args.text == NULL) { 158 if (args.text == NULL) {
159 text->text = cx_mutstr(strdup(" ")); 159 text->text = cx_strdup(" ");
160 } else { 160 } else {
161 text->text = cx_mutstr(strdup(args.text)); 161 text->text = cx_strdup(args.text);
162 } 162 }
163 if (args.centered) { 163 if (args.centered) {
164 asc_set_flag(node->flags, ASC_TEXT_CENTERED_FLAG); 164 asc_set_flag(node->flags, ASC_TEXT_CENTERED_FLAG);
165 } 165 }
166 166

mercurial