get_requested_height


Description:

public abstract double get_requested_height (Context cr, double width)

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

It gets the requested height 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 width that the item may be allocated.

Returns:

the requested height of the item, given the allocated width, or %-1 if the item doesn't support this method or its height doesn't change when allocated different widths.




2022 vala-language.org