Stk.GSourceGeometry.
This module is used to represent and compute widget coordinates.
A geometry is rectangle. x and y are coordinates of top-left corner.
seg_inter x1 w1 x2 w2 returns the intersection segment (left..right) between segments (x1..(x1+w1)) and (x2..(x2+w2)), if any.
inside ~x ~y g returns true is point (x, y) is inside g.
translate ~x ~y g returns a new geometry, adding x (resp. y) to g.x (resp. g.y) if specified.
enlarge ~w ~h g returns a new geometry whose width (resp. height) is increased by 2 * w (resp. 2 * h). g.x (resp. g.y) is translated by -w (resp. -h) so that the final geometry remains centered with report to the original one.
to_rect g creates a Tsdl.Sdl.rect from g.
of_rect r creates a geometry t from a Tsdl.Sdl.rect.
has_intersect g1 g2 returns true if intersection g1 g2 <> None.
remove_border g borders returns a new geometry by removing borders from g. It is ensured that the returned geometry has non-negative width and height.