ChafaImage

ChafaImage — An image to be placed on a ChafaCanvas

Functions

Types and Values

typedef ChafaImage

Description

A ChafaImage represents a raster image for placement on a ChafaCanvas. It can currently hold a single ChafaFrame.

To place an image on a canvas, it must first be assigned to a ChafaPlacement.

Functions

chafa_image_new ()

ChafaImage *
chafa_image_new (void);

Creates a new ChafaImage. The image is initially transparent and dimensionless.

Returns

The new image

Since: 1.14


chafa_image_ref ()

void
chafa_image_ref (ChafaImage *image);

Adds a reference to image .

Parameters

image

Image to add a reference to

 

Since: 1.14


chafa_image_unref ()

void
chafa_image_unref (ChafaImage *image);

Removes a reference from image . When the reference count drops to zero, the image is freed and can no longer be used.

Parameters

image

Image to remove a reference from

 

Since: 1.14


chafa_image_set_frame ()

void
chafa_image_set_frame (ChafaImage *image,
                       ChafaFrame *frame);

Assigns frame as the content for image . The image will keep its own reference to the frame.

Parameters

image

Image to assign frame to

 

frame

Frame to be assigned to image

 

Since: 1.14

Types and Values

ChafaImage

typedef struct ChafaImage ChafaImage;