Top |
#define | CHAFA_VERSION_MIN_REQUIRED |
#define | CHAFA_VERSION_MAX_ALLOWED |
#define | CHAFA_VERSION_1_0 |
#define | CHAFA_VERSION_1_2 |
#define | CHAFA_VERSION_1_4 |
#define | CHAFA_VERSION_1_6 |
#define | CHAFA_VERSION_1_8 |
#define | CHAFA_VERSION_1_10 |
#define | CHAFA_VERSION_1_12 |
#define | CHAFA_VERSION_1_14 |
enum | ChafaPixelType |
void chafa_calc_canvas_geometry (gint src_width
,gint src_height
,gint *dest_width_inout
,gint *dest_height_inout
,gfloat font_ratio
,gboolean zoom
,gboolean stretch
);
Calculates an optimal geometry for a ChafaCanvas given the width and height of an input image, maximum width and height of the canvas, font ratio, zoom and stretch preferences.
src_width
and src_height
must both be zero or greater.
dest_width_inout
and dest_height_inout
must point to integers
containing the maximum dimensions of the canvas in character cells.
These will be replaced by the calculated values, which may be zero if
one of the input dimensions is zero. If one or both of the input
parameters is negative, they will be treated as unspecified and
calculated based on the remaining parameters and aspect ratio.
font_ratio
is the font's width divided by its height. 0.5 is a typical
value.
# define CHAFA_VERSION_MIN_REQUIRED (CHAFA_VERSION_1_0)
A macro that can be defined by the user prior to including
the chafa.h header.
The definition should be one of the predefined Chafa version
macros: CHAFA_VERSION_1_0
, CHAFA_VERSION_1_2
,...
This macro defines the earliest version of Chafa that the package is required to be able to compile against.
If the compiler is configured to warn about the use of deprecated
functions, then using functions that were deprecated in version
CHAFA_VERSION_MIN_REQUIRED
or earlier will cause warnings (but
using functions deprecated in later releases will not).
Since: 1.2
# define CHAFA_VERSION_MAX_ALLOWED (CHAFA_VERSION_CUR_STABLE)
A macro that can be defined by the user prior to including
the chafa.h header.
The definition should be one of the predefined Chafa version
macros: CHAFA_VERSION_1_0
, CHAFA_VERSION_1_2
,...
This macro defines the latest version of the Chafa API that the package is allowed to make use of.
If the compiler is configured to warn about the use of deprecated
functions, then using functions added after version
CHAFA_VERSION_MAX_ALLOWED
will cause warnings.
This should normally be set to the same value as
CHAFA_VERSION_MIN_REQUIRED
.
Since: 1.2
Pixel formats supported by ChafaCanvas and ChafaSymbolMap.
Premultiplied RGBA, 8 bits per channel. |
||
Premultiplied BGRA, 8 bits per channel. |
||
Premultiplied ARGB, 8 bits per channel. |
||
Premultiplied ABGR, 8 bits per channel. |
||
Unassociated RGBA, 8 bits per channel. |
||
Unassociated BGRA, 8 bits per channel. |
||
Unassociated ARGB, 8 bits per channel. |
||
Unassociated ABGR, 8 bits per channel. |
||
Packed RGB (no alpha), 8 bits per channel. |
||
Packed BGR (no alpha), 8 bits per channel. |
||
Last supported pixel type, plus one. |
Since: 1.4