Function

PangoAttrShapenew_with_data

since: 1.8

Declaration [src]

PangoAttribute*
pango_attr_shape_new_with_data (
  const PangoRectangle* ink_rect,
  const PangoRectangle* logical_rect,
  gpointer data,
  PangoAttrDataCopyFunc copy_func,
  GDestroyNotify destroy_func
)

Description [src]

Creates a new shape attribute.

Like pango_attr_shape_new(), but a user data pointer is also provided; this pointer can be accessed when later rendering the glyph.

Available since: 1.8

Parameters

ink_rect

Type: PangoRectangle

Ink rectangle to assign to each character.

The data is owned by the caller of the function.
logical_rect

Type: PangoRectangle

Logical rectangle to assign to each character.

The data is owned by the caller of the function.
data

Type: gpointer

User data pointer.

The argument can be NULL.
The data is owned by the caller of the function.
copy_func

Type: PangoAttrDataCopyFunc

Function to copy data when the attribute is copied. If NULL, data is simply copied as a pointer.

destroy_func

Type: GDestroyNotify

Function to free data when the attribute is freed.

Return value

Type: PangoAttribute

The newly allocated PangoAttribute, which should be freed with pango_attribute_destroy().

The caller of the function takes ownership of the data, and is responsible for freeing it.