Search Results for

    Class TextWriterTools

    Text writer tools

    Inheritance
    object
    TextWriterTools
    Namespace
    Terminaux.Writer.CyclicWriters.Renderer.Tools @ Terminaux.dll
    Syntax
    public static class TextWriterTools


    Methods

    DetermineTextAlignment(string, int, TextAlignment, int)

    Determines the text alignment X position (zero-based)

    Remarks

    Split the sentences using GetWrappedSentencesByWords(string, int) or GetWrappedSentences(string, int) and call this for every line, or wrong results will occur!

    Returns
    int

    A zero-based X position of the aligned text

    Declaration
    public static int DetermineTextAlignment(string text, int width, TextAlignment alignment, int leftMargin = 0)
    Parameters
    Name Type Description
    text string

    Text to process

    width int

    Target width (zero-based)

    alignment TextAlignment

    Text alignment

    leftMargin int

    Left margin (zero-based)

    DetermineTextAlignment(string, TextAlignment, int)

    Determines the text alignment X position (zero-based)

    Returns
    int

    A zero-based X position of the aligned text

    Declaration
    public static int DetermineTextAlignment(string text, TextAlignment alignment, int leftMargin = 0)
    Parameters
    Name Type Description
    text string

    Text to process. Only the first line is taken, so split the sentences using GetWrappedSentencesByWords(string, int) or GetWrappedSentences(string, int).

    alignment TextAlignment

    Text alignment

    leftMargin int

    Left margin (zero-based)

    Show / Hide Table of Contents

    Table of contents



      About

      Copyright © 2014-2026 Aptivi

      Find us

    •  
    •  
    •  
    •  
    •  
    •  
    • Social media

    •  
    •  
    •  
    •