Browse Source

* Fix enumeration layout in the manpage documentation.

tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
23afd54c7c
5 changed files with 46 additions and 81 deletions
  1. +2
    -2
      TODO
  2. +6
    -12
      caca/caca.h
  3. +26
    -44
      cucul/dither.c
  4. +9
    -17
      cucul/export.c
  5. +3
    -6
      cucul/import.c

+ 2
- 2
TODO View File

@@ -12,10 +12,10 @@
just need to fill them)
- Error distribution dithering
- Add a random factor to the random ditherer. No need to change the API
for that, we can just pass "random:10" instead of "random" to the
for that, we can just pass \c "random:10" instead of \c "random" to the
cucul_set_bitmap_dithering() function.
- Implement the colour modes set in cucul_set_bitmap_color(). For the
moment only "full16" and "16" are implemented.
moment only \c "full16" and \c "16" are implemented.
- Fix the thin ellipse rendering (currently it's only |s and -s, we
could make them smoother by using ' ` , etc).
- support for double width glyphs (also needs some libcaca changes)


+ 6
- 12
caca/caca.h View File

@@ -43,30 +43,24 @@ typedef struct caca_event caca_event_t;
* This structure is filled by caca_get_event() when an event is received.
* The \e type field is always valid. The validity of the \e data union
* depends on the value of the \e type field:
*
* \li \b CACA_EVENT_NONE: no other field is valid.
*
* \li \b CACA_EVENT_KEY_PRESS, \b CACA_EVENT_KEY_RELEASE: the \e data.key.ch
* - \b CACA_EVENT_NONE: no other field is valid.
* - \b CACA_EVENT_KEY_PRESS, \b CACA_EVENT_KEY_RELEASE: the \e data.key.ch
* field is valid and contains either the ASCII value for the key, or
* an \e enum \e caca_key value. If the value is a printable ASCII
* character, the \e data.key.utf32 and \e data.key.utf8 fields are
* also filled and contain respectively the UTF-32/UCS-4 and the UTF-8
* representations of the character. Otherwise, their content is
* undefined.
*
* \li \b CACA_EVENT_MOUSE_PRESS, \b CACA_EVENT_MOUSE_RELEASE: the
* - \b CACA_EVENT_MOUSE_PRESS, \b CACA_EVENT_MOUSE_RELEASE: the
* \e data.mouse.button field is valid and contains the index of the
* mouse button that was pressed.
*
* \li \b CACA_EVENT_MOUSE_MOTION: the \e data.mouse.x and \e data.mouse.y
* - \b CACA_EVENT_MOUSE_MOTION: the \e data.mouse.x and \e data.mouse.y
* fields are valid and contain the mouse coordinates in character
* cells.
*
* \li \b CACA_EVENT_RESIZE: the \e data.resize.w and \e data.resize.h
* - \b CACA_EVENT_RESIZE: the \e data.resize.w and \e data.resize.h
* fields are valid and contain the new width and height values of
* the \e libcucul canvas attached to \e libcaca.
*
* \li \b CACA_EVENT_QUIT: no other field is valid.
* - \b CACA_EVENT_QUIT: no other field is valid.
*
* The result of accessing data members outside the above conditions is
* undefined.


+ 26
- 44
cucul/dither.c View File

@@ -489,11 +489,9 @@ int cucul_set_dither_contrast(cucul_dither_t *d, float contrast)
*
* Tell the renderer whether to antialias the dither. Antialiasing smoothens
* the rendered image and avoids the commonly seen staircase effect.
*
* \li \c "none": no antialiasing.
*
* \li \c "prefilter" or \c "default": simple prefilter antialiasing. This
* is the default value.
* - \c "none": no antialiasing.
* - \c "prefilter" or \c "default": simple prefilter antialiasing. This
* is the default value.
*
* If an error occurs, -1 is returned and \b errno is set accordingly:
* - \c EINVAL Invalid antialiasing mode.
@@ -550,23 +548,16 @@ char const * const *
*
* Tell the renderer which colours should be used to render the
* bitmap. Valid values for \c str are:
*
* \li \c "mono": use light gray on a black background.
*
* \li \c "gray": use white and two shades of gray on a black background.
*
* \li \c "8": use the 8 ANSI colours on a black background.
*
* \li \c "16": use the 16 ANSI colours on a black background.
*
* \li \c "fullgray": use black, white and two shades of gray for both the
* characters and the background.
*
* \li \c "full8": use the 8 ANSI colours for both the characters and the
* background.
*
* \li \c "full16" or \c "default": use the 16 ANSI colours for both the
* characters and the background. This is the default value.
* - \c "mono": use light gray on a black background.
* - \c "gray": use white and two shades of gray on a black background.
* - \c "8": use the 8 ANSI colours on a black background.
* - \c "16": use the 16 ANSI colours on a black background.
* - \c "fullgray": use black, white and two shades of gray for both the
* characters and the background.
* - \c "full8": use the 8 ANSI colours for both the characters and the
* background.
* - \c "full16" or \c "default": use the 16 ANSI colours for both the
* characters and the background. This is the default value.
*
* If an error occurs, -1 is returned and \b errno is set accordingly:
* - \c EINVAL Invalid colour set.
@@ -638,16 +629,13 @@ char const * const *
*
* Tell the renderer which characters should be used to render the
* dither. Valid values for \c str are:
*
* \li \c "ascii" or "default": use only ASCII characters. This is the
* default value.
*
* \li \c "shades": use Unicode characters "U+2591 LIGHT SHADE", "U+2592
* MEDIUM SHADE" and "U+2593 DARK SHADE". These characters are also
* present in the CP437 codepage available on DOS and VGA.
*
* \li \c "blocks": use Unicode quarter-cell block combinations. These
* characters are only found in the Unicode set.
* - \c "ascii" or \c "default": use only ASCII characters. This is the
* default value.
* - \c "shades": use Unicode characters "U+2591 LIGHT SHADE", "U+2592
* MEDIUM SHADE" and "U+2593 DARK SHADE". These characters are also
* present in the CP437 codepage available on DOS and VGA.
* - \c "blocks": use Unicode quarter-cell block combinations. These
* characters are only found in the Unicode set.
*
* If an error occurs, -1 is returned and \b errno is set accordingly:
* - \c EINVAL Invalid character set.
@@ -716,18 +704,12 @@ char const * const * cucul_get_dither_charset_list(cucul_dither_t const *d)
* Tell the renderer which dithering method should be used. Dithering is
* necessary because the picture being rendered has usually far more colours
* than the available palette. Valid values for \c str are:
*
* \li \c "none": no dithering is used, the nearest matching colour is used.
*
* \li \c "ordered2": use a 2x2 Bayer matrix for dithering.
*
* \li \c "ordered4": use a 4x4 Bayer matrix for dithering.
*
* \li \c "ordered8": use a 8x8 Bayer matrix for dithering.
*
* \li \c "random": use random dithering.
*
* \li \c "fstein": use Floyd-Steinberg dithering. This is the default value.
* - \c "none": no dithering is used, the nearest matching colour is used.
* - \c "ordered2": use a 2x2 Bayer matrix for dithering.
* - \c "ordered4": use a 4x4 Bayer matrix for dithering.
* - \c "ordered8": use a 8x8 Bayer matrix for dithering.
* - \c "random": use random dithering.
* - \c "fstein": use Floyd-Steinberg dithering. This is the default value.
*
* If an error occurs, -1 is returned and \b errno is set accordingly:
* - \c EINVAL Unknown dithering mode.


+ 9
- 17
cucul/export.c View File

@@ -49,23 +49,15 @@ static void export_tga(cucul_canvas_t *, cucul_buffer_t *);
* data is valid until cucul_free_buffer() is called.
*
* Valid values for \c format are:
*
* \li \c "caca": export native libcaca files.
*
* \li \c "ansi": export ANSI art (CP437 charset with ANSI colour codes).
*
* \li \c "html": export an HTML page with CSS information.
*
* \li \c "html3": export an HTML table that should be compatible with
* most navigators, including textmode ones.
*
* \li \c "irc": export UTF-8 text with mIRC colour codes.
*
* \li \c "ps": export a PostScript document.
*
* \li \c "svg": export an SVG vector image.
*
* \li \c "tga": export a TGA image.
* - \c "caca": export native libcaca files.
* - \c "ansi": export ANSI art (CP437 charset with ANSI colour codes).
* - \c "html": export an HTML page with CSS information.
* - \c "html3": export an HTML table that should be compatible with
* most navigators, including textmode ones.
* - \c "irc": export UTF-8 text with mIRC colour codes.
* - \c "ps": export a PostScript document.
* - \c "svg": export an SVG vector image.
* - \c "tga": export a TGA image.
*
* If an error occurs, NULL is returned and \b errno is set accordingly:
* - \c EINVAL Invalid format requested.


+ 3
- 6
cucul/import.c View File

@@ -51,12 +51,9 @@ static void ansi_parse_grcm(cucul_canvas_t *, struct ansi_grcm *,
* or cucul_load_file() into an internal libcucul canvas.
*
* Valid values for \c format are:
*
* \li \c "": attempt to autodetect the file format.
*
* \li \c "ansi": import ANSI files.
*
* \li \c "caca": import native libcaca files.
* - \c "": attempt to autodetect the file format.
* - \c "ansi": import ANSI files.
* - \c "caca": import native libcaca files.
*
* If an error occurs, NULL is returned and \b errno is set accordingly:
* - \c ENOMEM Not enough memory to allocate canvas.


Loading…
Cancel
Save