AminetAminet
Search:
84478 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/lib/rgba.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:RGB / RGBA parsing / formatting library
Author:TJ Holowaychuk
Uploader:Carsten Larsen (carsten larsen mail com)
Type:dev/lib
Version:0.1.0
Architecture:generic; m68k-amigaos
URL:https://github.com/clibs/rgba.git
Date:2020-05-03
Download:http://aminet.net/dev/lib/rgba.lha - View contents
Readme:http://aminet.net/dev/lib/rgba.readme
Downloads:756

Installation

    Copy rgba.h and rgba.c to you source code tree.

Example

    void test_named() {
        short ok;
        int32_t val = rgba_from_string("olive", &ok);
        assert(ok);
        assert(0x808000FF == val);
    }

API

    typedef struct {
        double r, g, b, a;
    } rgba_t;

    rgba_t
    rgba_new(uint32_t rgba);

    uint32_t
    rgba_from_string(const char *str, short *ok);

    void
    rgba_to_string(rgba_t rgba, char *buf, size_t len);

    void
    rgba_inspect(uint32_t rgba);


Contents of dev/lib/rgba.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[Amiga]                    132     146  90.4% -lh5- a626 May  1 12:30 rgba/Makefile
[Amiga]                    423     776  54.5% -lh5- d35c May  1 12:30 rgba/rgba.readme
[Amiga]                   2824    9654  29.3% -lh5- 0187 May  1 12:30 rgba/src/rgba.c
[Amiga]                    258     416  62.0% -lh5- 03df May  1 12:30 rgba/src/rgba.h
[Amiga]                  49714   93600  53.1% -lh5- 0cb0 May  1 12:30 rgba/test
[Amiga]                    568    1810  31.4% -lh5- d1fc May  1 12:30 rgba/test.c
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         6 files   53919  106402  50.7%            May  3 15:44

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>