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 number coerced to a double float for the width paintable could be drawn into or 0.0 if unknown
sheight -- a number coerced to a double float for the height paintable could be drawn into or 0.0 if unknown
dwidth -- a number coerced to a double float forh the width paintable would be drawn into if no other constraints were given
dheight -- a number coerced to a double float for 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

#2025-05-09