Documents for Imaging .NET Edition
GrapeCity.Documents.Common Assembly / GrapeCity.Documents.Text Namespace / TextLayout Class
Properties Methods

In This Topic
    TextLayout Class Members
    In This Topic

    The following tables list the members exposed by TextLayout.

    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public PropertyGets or sets a value indicating whether the line spacing should be added after the last line of text. The default is false.  
    Public PropertyGets or sets a value indicating whether to delay full text alignment till when any of the Split* methods is called.

    Do not use this property unless you are calling any of the Split* methods to render the text.

     
    Public PropertyGets or sets a value indicating whether long words can overhang beyond the layout box bounds. The default is false.  
    Public PropertyGets the list of anchored objects.  
    Public PropertyGets the array with bidi levels of the code points.  
    Public PropertyGets or sets whether the whole first line of a paragraph with indentation can be skipped. The default is true.  
    Public PropertyGets the array mapping code points to glyphs.  
    Public PropertyGets the number of code points.  
    Public PropertyGets the array of CodePointFlags, one for each code point.  
    Public PropertyGets the array of UTF-32 characters (code points). Only the first CodePointCount elements should be taken into account.  
    Public PropertyGets or sets the width of the layout box measured from the left margin (for positive values) or from the right margin (for negative values), in graphic units.  
    Public PropertyGets the height of the formatted text, in graphic units.  
    Public PropertyGets a value indicating whether the height of the formatted text fits in the specified MaxHeight.  
    Public PropertyGets the height of the formatted text, taking into account the trailing whitespace at the end of each line, in graphic units.  
    Public PropertyGets the rectangle containing the formatted text, in graphic units.  
    Public PropertyGets the width of the formatted text, in graphic units.  
    Public PropertyGets a value indicating whether the width of the formatted text fits in the specified MaxWidth.  
    Public PropertyGets the width of the formatted text, taking into account the trailing whitespace at the end of each line, in graphic units.  
    Public PropertyGet the rectangle of the formatted text, taking into account the trailing whitespace at the end of each line.  
    Public PropertyGets the X coordinate of the rectangle containing the formatted text, in graphic units.  
    Public PropertyGets the Y coordinate of the rectangle containing the formatted text, in graphic units.  
    Public PropertyGets the default text format for the current text layout.  
    Public PropertyGets or sets the spacing between the default tab stops, in graphic units.  
    Public PropertyGets or sets a UTF-32 character code used as a delimiter that signals the beginning of the portion of text to be preserved (for text trimming).  
    Public PropertyGets or sets the delimiter count, counting from the end of the text, to preserve text from (for text trimming).  
    Public PropertyGets or sets a UTF-32 code of the omission sign (ellipsis character) for text trimming.

    Setting this property to 0 prevents the ellipsis character from showing.

     
    Public PropertyGets or sets the indent of the first line after paragraph separator, in graphic units.  
    Public PropertyGets or sets a value indicating whether the first line of text is the start of paragraph. The default is true.  
    Public PropertyGets or sets the flow direction (how lines of text are placed relative to one another).  
    Public PropertyGets or sets the custom font collection used for searching fonts and font fallbacks.  
    Public PropertyGets or sets a value specifying the scope for searching fallback fonts with the glyphs missing in the font defined in TextFormat.  
    Public PropertyThe uniform scale factor for all fonts used in the current text layout.

    Valid values are from 0.001 to 1000. The default is 1.

     
    Public PropertyGets the array of TextFormat objects, one for each code point.  
    Public PropertyGets the array with general classification of the code points.  
    Public PropertyGets the number of resulting glyphs.  
    Public PropertyGets the linked list with each glyph info.  
    Public PropertyGets the array mapping code points to glyph runs.  
    Public PropertyGets or sets a value indicating whether line spacing for the last line is considered a part of the layout content. The default is false.  
    Public PropertyGets the list of inline objects.  
    Public PropertyGets the list of inline elements derived from Inline, such as TextRun and LineBreak.  
    Public PropertyGets or sets the maximum white space extension factor before applying extension to other characters when text is justified.

    Valid values are from 0 to 10000. The default is 2.5.

     
    Public PropertyGets or sets the white space shrinking factor when text is justified.

    Valid values are from 0.0 to 1.0. The default is 0.2.

     
    Public PropertyGets or sets the maximum text extension factor when text is justified.

    Valid values are from 0 to 10000. The default is 0.3.

     
    Public PropertyGets or sets a value indicating whether the last line of text is the end of paragraph. The default is true.  
    Public PropertyGets a value indicating if PerformLayout method was executed at least once.  
    Public PropertyGets or sets a value indicating whether the typographic line gap should be added before the first line of text. The default is false.  
    Public PropertyGets the list of text lines after executing the PerformLayout method.  
    Public PropertyGets or sets the scaling factor to be applied to the computed line height.

    Valid values are from 0 to 1000. The default is 1.

     
    Public PropertyGets or sets all margings of the layout box, in graphic units.

    Returns null if the margins have different values.

     
    Public PropertyGets or sets the bottom margin of the layout box, in graphic units.  
    Public PropertyGets or sets the left margin of the layout box, in graphic units.  
    Public PropertyGets or sets the right margin of the layout box, in graphic units.  
    Public PropertyGets or sets the top margin of the layout box, in graphic units.  
    Public PropertyGets or sets the height of the layout box, in graphic units.  
    Public PropertyGets or sets the width of the layout box, in graphic units.  
    Public PropertyGets or sets the explicit minimal distance between lines, in graphic units.  
    Public PropertyGets or sets the list of areas occupied by embedded objects.  
    Public PropertyGets or sets the alignment of paragraphs along the flow direction axis.  
    Public PropertyGets or sets the additional spacing between paragraphs, in graphic units.  
    Public PropertyGets or sets the resolution (graphic units per inch) used by the current text layout.  
    Public PropertyGets or sets a value indicating whether the fonts should be searched in the custom collection only, if any specified. The default is false.  
    Public PropertyGets or sets the base direction for horizontal and sideways text. The default is false.  
    Public PropertyGets or sets a value indicating whether sideways text should be rotated counterclockwise. The default is false.  
    Public PropertyGets or sets the height of the layout box measured from the top margin (for positive values) or from the bottom margin (for negative values), in graphic units.  
    Public PropertyGets the array of ScriptCode's, one for each code point.  
    Public PropertyGets the array of ScriptTag's, one for each code point.  
    Public PropertyGets the first code point index of the current split rest, if this TextLayout contains the rest lines after calling the Split or SplitAndBalance methods.  
    Public PropertyGets or sets a value indicating if shaping and positioning of graphemes should be skipped for the sake of speed. The default is false.  
    Public PropertyGets or sets the list of tab stops.  
    Public PropertyGets or sets the alignment of text along the reading direction axis.  
    Public PropertyGets or sets the text granularity used to trim text overflowing the layout box.  
    Public PropertyGets or sets the explicit distance between lines, in graphic units.  
    Public PropertyGets or sets a value indicating if the linked and fallback fonts have to be embeddable. The default is false.  
    Public PropertyIndicates whether the following scripts should use their old tags: Bengali, Devanagari, Gujarati, Gurmukhi, Kannada, Malayalam, Myanmar, Odia, Tamil, Telugu. The default is false.  
    Public PropertyGets a value indicating whether the FlowDirection was vertical when RecalculateGlyphs was last called.  
    Public PropertyGets or sets a value specifying how text lines are broken to avoid text overflowing the layout box.  
    Top
    Public Methods
     NameDescription
    Public MethodOverloaded. Adds a text run with default formatting to the end of the Inlines collection.  
    Public MethodAdds an anchored object with specified dimensions to the end of the Inlines collection.  
    Public MethodOverloaded. Adds an inline object with specified dimensions to the end of the Inlines collection.  
    Public MethodOverloaded. Adds a line break element to the end of the Inlines collection.  
    Public MethodOverloaded. Adds the special character (0x2029) that causes a paragraph break but prevents a page break between paragraphs (GrapeCity specifics).  
    Public MethodOverloaded. Adds a line separator character (0x2028) that causes a line break without ending the paragraph.  
    Public MethodAdjusts the positions of content rectangle, inline and anchored objects by a specified amount.  
    Public MethodClears the current text layout, removing all text and formatting associated with individual text runs.  
    Public MethodGets the InlineObject at the specified code point index.  
    Public MethodReturns the list of TextRect objects for the specified range of code points.  
    Public MethodMaps a character range to the corresponding code point range.  
    Public MethodMaps a code point range to the corresponding character range.  
    Public MethodDetermines the coordinates for all lines and glyph runs. Optionally calls RecalculateGlyphs prior to performing the layout.  
    Public MethodConverts characters in the current TextLayout to glyphs, and performs text shaping.

    In order to layout the text (e.g. when rendering it on a graphics), a call to this method must precede the call(s) to PerformLayout, or alternatively the PerformLayout method should be called with true as the parameter.

     
    Public MethodFits all or the first portion of the current text layout into the current layout bounds. If the whole text did not fit into the bounds, the rest is moved into a new TextLayout instance specified by the output parameter rest.  
    Public MethodFits all or the first portion of the current text layout into one or more layout areas (such as page columns). If the whole text did not fit into the provided areas, the rest is moved into a new TextLayout instance specified by the output parameter rest.

    If the whole text fits in the specified areas (i.e. rest is empty), the content is equally distributed between all areas, which in the case of page columns results in columns of equal height (balanced).

     
    Public MethodFits all or the first portion of the current text layout into one or more layout areas (such as page columns). If the whole text did not fit into the provided areas, the rest is moved into a new TextLayout instance specified by the output parameter rest.

    If the whole text fits in the specified areas (i.e. rest is empty), the content is equally distributed between all areas, which in the case of page columns results in columns of equal height (balanced).

    For details on why providing a reference to an existing TextLayout may be beneficial, see the remarks on the SplitRef method.  
    Public MethodFits all or the first portion of the current text layout into the current layout bounds. If the whole text did not fit into the bounds, the rest is moved into the TextLayout instance specified by the reference parameter rest. If it is null, a new TextLayout instance is created.  
    Top
    See Also