Package: gdk

Function gdk:paintable-compute-concrete-size

Lambda List

gdk:paintable-compute-concrete-size (paintable swidth sheight dwidth dheight)

Arguments

paintable -- a gdk:paintable object
swidth -- a double float with the width paintable could be drawn into or 0.0 if unknown
sheight -- a double float with the height paintable could be drawn into or 0.0 if unknown
dwidth -- a double float with the width paintable would be drawn into if no other constraints were given
dheight -- a double float with the height paintable would be drawn into if no other constraints were given

Return Value

cwidth - a double float with the concrete width computed
cheight - a double float with the concrete height computed

Details

Applies the sizing algorithm outlined in https://drafts.csswg.org/css-images-3/default-sizing to the given paintable. See that link for more details.

It is not necessary to call this function when both swidth and sheight are known, but it is useful to call this function in GtkWidget:measure implementations to compute the other dimension when only one dimension is given.
 

See also

#2023-8-1