diff options
introduce drw_fontset_getwidth_clamp()
getting the width of a string is an O(n) operation, and in many cases
users only care about getting the width upto a certain number.
instead of calling drw_fontset_getwidth() and *then* clamping the
result, this patch introduces drw_fontset_getwidth_clamp() function,
similar to strnlen(), which will stop once we reach n.
the `invert` parameter was overloaded internally to preserve the API,
however library users should be calling drw_fontset_getwidth_clamp() and
not depend upon internal behavior of drw_text().
Diffstat (limited to 'drw.h%252525253fid%252525253d6be057f060543bb0f3ed9423904263617cdffffe%2525253fid%2525253d6be057f060543bb0f3ed9423904263617cdffffe&id2%2525253d41fdabbf7c517f8d524b70cbd78238cc319ccef3%25253fid%25253d6be057f060543bb0f3ed9423904263617cdffffe&id2%25253d41fdabbf7c517f8d524b70cbd78238cc319ccef3%253fid%253d6be057f060543bb0f3ed9423904263617cdffffe&id2%253d41fdabbf7c517f8d524b70cbd78238cc319ccef3%3fid%3d6be057f060543bb0f3ed9423904263617cdffffe&id2%3d41fdabbf7c517f8d524b70cbd78238cc319ccef3?id=6be057f060543bb0f3ed9423904263617cdffffe')
0 files changed, 0 insertions, 0 deletions