Search Results for

    Show / Hide Table of Contents

    Method GetStringWidth

    GetStringWidth(String, Font, Single)

    Measures how many pixels in the horizontal axis the string will use when drawn

    Declaration
    public static float GetStringWidth(string text, Font font = Font.ChaletLondon, float scale = 1F)
    Parameters
    Type Name Description
    System.String text

    The string of text to measure.

    Font font

    The Font of the textu to measure.

    System.Single scale

    Sets a sclae value for increasing or decreasing the size of the text, default value 1.0f - no scaling.

    Returns
    Type Description
    System.Single

    The amount of pixels scaled on a 1280 pixel width base

    ☀
    ☾
    Back to top Copyright (C) 2015 crosire - zlib
    Generated with DocFX