get_requested_area_for_width


Description:

[ Version ( since = "2.0.1" ) ]
public abstract bool get_requested_area_for_width (Context cr, double width, CanvasBounds requested_area)

This function is only intended to be used when implementing new canvas items, specifically layout items such as CanvasTable.

It gets the requested area of a child item, assuming it is allocated the given width. This is useful for text items whose requested height may change depending on the allocated width.

Parameters:

this

a CanvasItem.

cr

a cairo context.

width

the allocated width.

requested_area

a CanvasBounds to return the requested area in, in the parent's coordinate space. If false is returned, this is undefined.

Returns:

true if the item's requested area changes due to the new allocated width.