Ignore:
Timestamp:
Feb 6, 2011, 4:27:15 PM (11 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Preliminary support of <hr>
  • Minor cleaning
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gaycko/trunk/src/render/renderer.c

    r4755 r4758  
    1515        window->dom->root->properties->width = window->width;
    1616    gaycko_get_position(window->dom->root, NULL);
     17    caca_set_canvas_size(window->cv,
     18                         window->dom->root->properties->width,
     19                         window->dom->root->properties->height);
    1720    gaycko_print_dom(window);
    1821}
     
    2629        int c = 0;
    2730   
    28     if(node->type == ELEM_TEXT) {
    29         caca_set_color_argb(window->cv, 0, 0xFFFF);
    30         caca_printf(window->cv, node->properties->x, node->properties->y, node->text);
    31     }
     31    switch(node->type) {
     32                case ELEM_TEXT:
     33                caca_set_color_argb(window->cv, 0, 0xFFFF);
     34                caca_put_str(window->cv, node->properties->x, node->properties->y, node->text);
     35            break;
     36        case ELEM_HR:
     37                        caca_draw_line(window->cv,
     38                           node->properties->x, node->properties->y,
     39                           node->properties->x+node->parent->properties->width, node->properties->y,
     40                           '-');
     41            printf("Line parent is '%s', width %d\n", node->parent->name, node->parent->properties->width);
     42                break;
     43        default:
     44           
     45            break;
     46        }
    3247       
    3348    for(c = 0; c < node->children_count; c++) {
Note: See TracChangeset for help on using the changeset viewer.