comparison src/redraw_man.c @ 27:19c603dd6ff9

Add text shape.
author Thinker K.F. Li <thinker@branda.to>
date Mon, 04 Aug 2008 10:10:47 +0800
parents d50f33040de6
children 604bc90d509d
comparison
equal deleted inserted replaced
26:d50f33040de6 27:19c603dd6ff9
95 95
96 static void clean_shape(shape_t *shape) { 96 static void clean_shape(shape_t *shape) {
97 switch(shape->sh_type) { 97 switch(shape->sh_type) {
98 case SHT_PATH: 98 case SHT_PATH:
99 sh_path_transform(shape); 99 sh_path_transform(shape);
100 break;
101 case SHT_TEXT:
102 sh_text_transform(shape);
100 break; 103 break;
101 #ifdef UNITTEST 104 #ifdef UNITTEST
102 default: 105 default:
103 sh_dummy_transform(shape); 106 sh_dummy_transform(shape);
104 break; 107 break;
481 fill->prepare(fill, rdman->cr); 484 fill->prepare(fill, rdman->cr);
482 switch(shape->sh_type) { 485 switch(shape->sh_type) {
483 case SHT_PATH: 486 case SHT_PATH:
484 sh_path_fill(shape, rdman->cr); 487 sh_path_fill(shape, rdman->cr);
485 break; 488 break;
489 case SHT_TEXT:
490 sh_text_fill(shape, rdman->cr);
491 break;
486 #ifdef UNITTEST 492 #ifdef UNITTEST
487 default: 493 default:
488 sh_dummy_fill(shape, rdman->cr); 494 sh_dummy_fill(shape, rdman->cr);
489 break; 495 break;
490 #endif /* UNITTEST */ 496 #endif /* UNITTEST */
495 stroke->prepare(stroke, rdman->cr); 501 stroke->prepare(stroke, rdman->cr);
496 set_shape_stroke_param(shape, rdman->cr); 502 set_shape_stroke_param(shape, rdman->cr);
497 switch(shape->sh_type) { 503 switch(shape->sh_type) {
498 case SHT_PATH: 504 case SHT_PATH:
499 sh_path_stroke(shape, rdman->cr); 505 sh_path_stroke(shape, rdman->cr);
506 break;
507 case SHT_TEXT:
508 sh_text_stroke(shape, rdman->cr);
500 break; 509 break;
501 #ifdef UNITTEST 510 #ifdef UNITTEST
502 default: 511 default:
503 /* sh_dummy_fill(shape, rdman->cr); */ 512 /* sh_dummy_fill(shape, rdman->cr); */
504 break; 513 break;