View Single Post
Old 06-13-2019, 03:18 AM   #128
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
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.
NiLuJe is offline   Reply With Quote