Top |
ChafaPlacementChafaPlacement — Placement of a ChafaImage on a ChafaCanvas |
ChafaPlacement * | chafa_placement_new () |
void | chafa_placement_ref () |
void | chafa_placement_unref () |
ChafaTuck | chafa_placement_get_tuck () |
void | chafa_placement_set_tuck () |
ChafaAlign | chafa_placement_get_halign () |
void | chafa_placement_set_halign () |
ChafaAlign | chafa_placement_get_valign () |
void | chafa_placement_set_valign () |
A ChafaPlacement describes how an image is placed on a ChafaCanvas. It contains information about the image, its alignment and tucking policy.
ChafaPlacement * chafa_placement_new (ChafaImage *image
,gint id
);
Creates a new ChafaPlacement.
image |
The image to place on the canvas |
|
id |
An ID to assign to the placement, or <= 0 to assign one automatically |
Since: 1.14
void
chafa_placement_ref (ChafaPlacement *placement
);
Adds a reference to placement
.
Since: 1.14
void
chafa_placement_unref (ChafaPlacement *placement
);
Removes a reference from placement
. When remaining references drops to
zero, the placement is freed and can no longer be used.
Since: 1.14
ChafaTuck
chafa_placement_get_tuck (ChafaPlacement *placement
);
Gets the tucking policy of placement
. This describes how the image is
resized to fit placement
's extents, and defaults to CHAFA_TUCK_STRETCH.
Since: 1.14
void chafa_placement_set_tuck (ChafaPlacement *placement
,ChafaTuck tuck
);
Sets the tucking policy for placement
to tuck
. This describes how the image is
resized to fit placement
's extents, and defaults to CHAFA_TUCK_STRETCH.
Since: 1.14
ChafaAlign
chafa_placement_get_halign (ChafaPlacement *placement
);
Gets the horizontal alignment of placement
. This determines how any
padding added by the tucking policy is distributed, and defaults to
CHAFA_ALIGN_START.
Since: 1.14
void chafa_placement_set_halign (ChafaPlacement *placement
,ChafaAlign align
);
Sets the horizontal alignment of placement
. This determines how any
padding added by the tucking policy is distributed, and defaults to
CHAFA_ALIGN_START.
Since: 1.14
ChafaAlign
chafa_placement_get_valign (ChafaPlacement *placement
);
Gets the vertical alignment of placement
. This determines how any
padding added by the tucking policy is distributed, and defaults to
CHAFA_ALIGN_START.
Since: 1.14
void chafa_placement_set_valign (ChafaPlacement *placement
,ChafaAlign align
);
Sets the vertical alignment of placement
. This determines how any
padding added by the tucking policy is distributed.
Since: 1.14
Resizing options when placing an element within an area. Usually used in conjunction with ChafaAlign to control the padding.
Resize element to fit the area exactly, changing its aspect ratio. |
||
Resize element to fit the area, preserving its aspect ratio by adding padding. |
||
Like |
||
Last supported tucking policy, plus one. |
Since: 1.14