Function

Pango.AttrShape.new_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.

Parameters

ink_rect PangoRectangle
 

ink rectangle to assign to each character

 Ownership is not transferred to the callee
logical_rect PangoRectangle
 

logical rectangle to assign to each character

 Ownership is not transferred to the callee
data gpointer
 

user data pointer

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()

Ownership of the data is transferred to the caller