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/caca/legacy.c

    r2821 r3495  
    11/*
    22 *  libcaca       Colour ASCII-Art library
    3  *  Copyright (c) 2002-2006 Sam Hocevar <sam@zoy.org>
     3 *  Copyright (c) 2002-2009 Sam Hocevar <sam@hocevar.net>
    44 *                All Rights Reserved
    55 *
     
    9999{
    100100    caca_canvas_t *cv = caca_create_canvas(0, 0);
    101     int ret = caca_import_memory(cv, (unsigned char const *)buf->data,
    102                                   buf->size, format);
     101    int ret = caca_import_canvas_from_memory(cv,
     102                                             (unsigned char const *)buf->data,
     103                                             buf->size, format);
    103104    if(ret < 0)
    104105    {
     
    125126    }
    126127
    127     ex->data = caca_export_memory(cv, format, &ex->size);
     128    ex->data = caca_export_canvas_to_memory(cv, format, &ex->size);
    128129    if(!ex->data)
    129130    {
Note: See TracChangeset for help on using the changeset viewer.