![]() |
![]() |
![]() |
Pigment Render Reference Manual | ![]() |
---|---|---|---|---|
enum PgmRenderLayoutAspectStyle; PgmRenderLayoutIFace; PgmRenderError pgm_render_layout_set_size (PgmRenderLayoutIFace *layout, gint width, gint height); PgmRenderError pgm_render_layout_get_size (PgmRenderLayoutIFace *layout, gint *width, gint *height); PgmRenderError pgm_render_layout_set_position (PgmRenderLayoutIFace *layout, gint x, gint y); PgmRenderError pgm_render_layout_get_position (PgmRenderLayoutIFace *layout, gint *x, gint *y); PgmRenderError pgm_render_layout_set_alignment (PgmRenderLayoutIFace *layout, gfloat x, gfloat y); PgmRenderError pgm_render_layout_get_alignment (PgmRenderLayoutIFace *layout, gfloat *x, gfloat *y); PgmRenderError pgm_render_layout_set_aspect_style (PgmRenderLayoutIFace *layout, PgmRenderLayoutAspectStyle style); PgmRenderError pgm_render_layout_get_aspect_style (PgmRenderLayoutIFace *layout, PgmRenderLayoutAspectStyle *style); PgmRenderError pgm_render_layout_set_aspect_ratio (PgmRenderLayoutIFace *layout, gfloat ratio); PgmRenderError pgm_render_layout_get_aspect_ratio (PgmRenderLayoutIFace *layout, gfloat *ratio);
typedef enum { PGM_RENDER_LAYOUT_FILLED = 0, PGM_RENDER_LAYOUT_SCALED = 1, PGM_RENDER_LAYOUT_CENTERED = 2 } PgmRenderLayoutAspectStyle;
The different aspect ratio style.
PgmRenderError pgm_render_layout_set_size (PgmRenderLayoutIFace *layout, gint width, gint height);
Set the size of the object to (width, height).
layout : |
A PgmRenderLayoutIFace object. |
width : |
The width of the object. |
height : |
The height of the object. |
Returns : |
PgmRenderError pgm_render_layout_get_size (PgmRenderLayoutIFace *layout, gint *width, gint *height);
Retrieves the (width, height) size of the object.
layout : |
A PgmRenderLayoutIFace object. |
width : |
The width of the object to fill. |
height : |
The height of the object to fill. |
Returns : |
PgmRenderError pgm_render_layout_set_position (PgmRenderLayoutIFace *layout, gint x, gint y);
Set the position of the object to (x, y).
layout : |
A PgmRenderLayoutIFace object. |
x : |
The x position of the object. |
y : |
The y position of the object. |
Returns : |
PgmRenderError pgm_render_layout_get_position (PgmRenderLayoutIFace *layout, gint *x, gint *y);
Retrieves the (x, y) position of the object.
layout : |
A PgmRenderLayoutIFace object. |
x : |
The x position of the object to fill. |
y : |
The y position of the object to fill. |
Returns : |
PgmRenderError pgm_render_layout_set_alignment (PgmRenderLayoutIFace *layout, gfloat x, gfloat y);
Set the alignment of the object to (x, y).
layout : |
A PgmRenderLayoutIFace object. |
x : |
The x alignment of the object between 0.0 and 1.0. |
y : |
The y alignment of the object between 0.0 and 1.0. |
Returns : |
PgmRenderError pgm_render_layout_get_alignment (PgmRenderLayoutIFace *layout, gfloat *x, gfloat *y);
Retrieves the (x, y) position of the object.
layout : |
A PgmRenderLayoutIFace object. |
x : |
The x alignment of the object to fill. 0.5 by default. |
y : |
The y alignment of the object to fill. 0.5 by default. |
Returns : |
PgmRenderError pgm_render_layout_set_aspect_style (PgmRenderLayoutIFace *layout, PgmRenderLayoutAspectStyle style);
Set the aspect-ratio style of the object.
layout : |
A PgmRenderLayoutIFace object. |
style : |
The aspect-ratio style of the object. |
Returns : |
PgmRenderError pgm_render_layout_get_aspect_style (PgmRenderLayoutIFace *layout, PgmRenderLayoutAspectStyle *style);
Retrieves the aspect-ratio style of the object.
layout : |
A PgmRenderLayoutIFace object. |
style : |
The aspect-ratio style of the object to fill. |
Returns : |
PgmRenderError pgm_render_layout_set_aspect_ratio (PgmRenderLayoutIFace *layout, gfloat ratio);
Set a custom aspect-ratio (width/height) to the object.
layout : |
A PgmRenderLayoutIFace object. |
ratio : |
The custom ratio. |
Returns : |
PgmRenderError pgm_render_layout_get_aspect_ratio (PgmRenderLayoutIFace *layout, gfloat *ratio);
Retrieves the custom aspect-ratio (width/height) of the object.
layout : |
A PgmRenderLayoutIFace object. |
ratio : |
The custom ratio to fill. |
Returns : |