Ignore:
Timestamp:
Apr 18, 2006, 5:54:33 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Renamed main canvas-related functions so that they have "canvas" in their name, eg. cucul_create() -> cucul_create_canvas() etc.
  • Moved buffer-related functions to cucul/buffer.c.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/cacaview.c

    r811 r813  
    6969
    7070    /* Initialise libcucul */
    71     cv = cucul_create(0, 0);
     71    cv = cucul_create_canvas(0, 0);
    7272    if(!cv)
    7373    {
     
    8686    caca_set_window_title(dp, "cacaview");
    8787
    88     ww = cucul_get_width(cv);
    89     wh = cucul_get_height(cv);
     88    ww = cucul_get_canvas_width(cv);
     89    wh = cucul_get_canvas_height(cv);
    9090
    9191    /* Fill the zoom table */
     
    305305            cucul_putstr(cv, (ww - strlen(buffer)) / 2, wh / 2, buffer);
    306306            caca_display(dp);
    307             ww = cucul_get_width(cv);
    308             wh = cucul_get_height(cv);
     307            ww = cucul_get_canvas_width(cv);
     308            wh = cucul_get_canvas_height(cv);
    309309
    310310            if(im)
     
    410410        unload_image(im);
    411411    caca_detach(dp);
    412     cucul_free(cv);
     412    cucul_free_canvas(cv);
    413413
    414414    return 0;
     
    473473    if(zoom < -ZOOM_MAX) zoom = -ZOOM_MAX;
    474474
    475     ww = cucul_get_width(cv);
     475    ww = cucul_get_canvas_width(cv);
    476476    height = fullscreen ? wh : wh - 3;
    477477
    478478    xfactor = (zoom < 0) ? 1.0 / zoomtab[-zoom] : zoomtab[zoom];
    479479    yfactor = xfactor * ww / height * im->h / im->w
    480                * cucul_get_height(cv) / cucul_get_width(cv)
     480               * cucul_get_canvas_height(cv) / cucul_get_canvas_width(cv)
    481481               * caca_get_window_width(dp) / caca_get_window_height(dp);
    482482
     
    507507    int xn, yn;
    508508
    509     if(x2 + 1 > (int)cucul_get_width(cv)) x2 = cucul_get_width(cv) - 1;
    510     if(y2 + 1 > (int)cucul_get_height(cv)) y2 = cucul_get_height(cv) - 1;
     509    if(x2 + 1 > (int)cucul_get_canvas_width(cv))
     510        x2 = cucul_get_canvas_width(cv) - 1;
     511    if(y2 + 1 > (int)cucul_get_canvas_height(cv))
     512        y2 = cucul_get_canvas_height(cv) - 1;
    511513
    512514    for(yn = y1 > 0 ? y1 : 0; yn <= y2; yn++)
Note: See TracChangeset for help on using the changeset viewer.