(bind-func toString
"specialised toString function for Rect*"
(lambda (rct:Rect*)
(let ((str:i8* (salloc 256)))
(if (null? rct)
(sprintf str "<Rect 0x0>")
(sprintf str "<Rect: x=%.3f y=%.3f w=%.3f h=%.3f>"
(convert (tref rct 0) double)
(convert (tref rct 1) double)
(convert (tref rct 2) double)
(convert (tref rct 3) double)))
(Str str))))