func_graphics_max2d_textwidth.rst 435 B

123456789101112131415161718192021222324252627282930313233343536
  1. .. _func_graphics_max2d_textwidth:
  2. =========
  3. TextWidth
  4. =========
  5. TextWidth -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. TextWidth( text$ )
  10. Get width of text
  11. This command is useful for calculating horizontal alignment of text when using
  12. the #DrawText command.
  13. Parameters
  14. ==========
  15. Return Values
  16. =============
  17. the width, in pixels, of @text based on the current image font.
  18. Examples
  19. ========
  20. See Also
  21. ========