IIRC, it returns 0 as a top margin when the drawing area is full.
On the CLI, you can get that either as a status code or on stdout, via the linecode/linecount flags.
That's OTOH, so, err, take that with a grain of salt ;p.
That's not exactly what you want, though, because if it happens to fit perfectly without truncation, it can perfectly well return 0 too, it just means there's no room for another line, not necessarily that the last one was truncated...
@sherman : in this case, as that looks fairly specific to the OT codepath, maybe changing the return type to a Struct with everything you need would be less clunky than the "chuck it somewhere, quite possibly a global, and access it via an accessory function" approach taken by the last rect stuff...
Last edited by NiLuJe; 06-13-2019 at 03:23 AM.
|