Ignore:
Timestamp:
May 21, 2009, 10:55:21 PM (11 years ago)
Author:
Sam Hocevar
Message:

Add caca_export_area_to_memory() to export only a selected part of the
current canvas. This is useful to export dirty rectangles. Accordingly,
add caca_import_area_from_memory() and caca_import_area_from_file().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/examples/transform.c

    r2821 r3495  
    11/*
    22 *  unicode       libcaca Unicode rendering test program
    3  *  Copyright (c) 2006 Sam Hocevar <sam@zoy.org>
     3 *  Copyright (c) 2006-2009 Sam Hocevar <sam@hocevar.net>
    44 *                All Rights Reserved
    55 *
     
    6060
    6161    caca_set_color_ansi(sprite, CACA_LIGHTMAGENTA, CACA_BLACK);
    62     caca_import_memory(sprite, pig, strlen(pig), "text");
     62    caca_import_canvas_from_memory(sprite, pig, strlen(pig), "text");
    6363    caca_blit(image, 55, 0, sprite, NULL);
    6464
    6565    caca_set_color_ansi(sprite, CACA_LIGHTGREEN, CACA_BLACK);
    66     caca_import_memory(sprite, duck, strlen(duck), "text");
     66    caca_import_canvas_from_memory(sprite, duck, strlen(duck), "text");
    6767    caca_blit(image, 30, 1, sprite, NULL);
    6868
Note: See TracChangeset for help on using the changeset viewer.