Function

PangoAttrShapenew_with_data

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 PangoRectangle
 

Ink rectangle to assign to each character.

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

Logical rectangle to assign to each character.

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

User data pointer.

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

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

destroy_func GDestroyNotify
 

Function to free data when the attribute is freed.

Return value

Returns: 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.