BColorMap

BColorMap — Object for holding a set of colors.

Functions

Signals

void changed Run First

Types and Values

Object Hierarchy

    GObject
    ╰── BColorMap

Description

Functions

b_color_map_new ()

BColorMap *
b_color_map_new (void);

Create a new BColorMap and set it to the default "stock" palette.

Returns

the new color map.


b_color_map_copy ()

BColorMap *
b_color_map_copy (BColorMap *pal);

Create a copy of pal , an existing BColorMap.

Parameters

pal

a BColorMap

 

Returns

the new color map.

[transfer full]


b_color_map_size ()

gint
b_color_map_size (BColorMap *pal);

Get the number of colors in pal .

Parameters

pal

a BColorMap

 

Returns

the number of colors.


b_color_map_get ()

guint32
b_color_map_get (BColorMap *pal,
                 gint i);

Get the ith color in pal .

Parameters

pal

a BColorMap

 

i

an integer

 

Returns

the color


b_color_map_set_monochrome ()

void
b_color_map_set_monochrome (BColorMap *pal,
                            guint32 c);

Set the color map palette to have only one color.

Parameters

pal

a BColorMap

 

c

a color

 

b_color_map_set_transition ()

void
b_color_map_set_transition (BColorMap *pal,
                            guint32 c1,
                            guint32 c2);

Set the color map palette to have two colors.

Parameters

pal

a BColorMap

 

c1

a color

 

c2

another color

 

b_color_map_set_custom ()

void
b_color_map_set_custom (BColorMap *pal,
                        gint N,
                        guint32 *color);

Set the color map palette from an array of colors

Parameters

pal

a BColorMap

 

N

the number of colors

 

color

an array of colors

 

Types and Values

BColorMap

typedef struct _BColorMap BColorMap;

Signal Details

The “changed” signal

void
user_function (BColorMap *bcolormap,
               gpointer   user_data)

Flags: Run First