iText 8.0.5 API
iText.Layout.Layout.TextLayoutResult Class Reference

Represents the result of a text layout. More...

Inheritance diagram for iText.Layout.Layout.TextLayoutResult:
iText.Layout.Layout.MinMaxWidthLayoutResult iText.Layout.Layout.LayoutResult

Public Member Functions

  TextLayoutResult (int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer)
  Creates the LayoutResult result of layouting }. More...
 
  TextLayoutResult (int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer, IRenderer cause)
  Creates the LayoutResult result of layouting }. More...
 
virtual bool  IsWordHasBeenSplit ()
  Indicates whether some word in a rendered text was split during layout. More...
 
virtual iText.Layout.Layout.TextLayoutResult  SetWordHasBeenSplit (bool wordHasBeenSplit)
  Sets wordHasBeenSplit More...
 
virtual bool  IsSplitForcedByNewline ()
  Indicates whether split was forced by new line symbol in rendered text. More...
 
virtual iText.Layout.Layout.TextLayoutResult  SetSplitForcedByNewline (bool isSplitForcedByNewline)
  Sets IsSplitForcedByNewline() More...
 
virtual bool  IsContainsPossibleBreak ()
  Indicates whether split renderer contains possible break. More...
 
virtual iText.Layout.Layout.TextLayoutResult  SetContainsPossibleBreak (bool containsPossibleBreak)
  Sets IsContainsPossibleBreak(). More...
 
virtual iText.Layout.Layout.TextLayoutResult  SetStartsWithSplitCharacterWhiteSpace (bool startsWithSplitCharacterWhiteSpace)
  Sets IsStartsWithSplitCharacterWhiteSpace(). More...
 
virtual bool  IsStartsWithSplitCharacterWhiteSpace ()
  Indicates whether TextRenderer::line starts with a whitespace. More...
 
virtual iText.Layout.Layout.TextLayoutResult  SetEndsWithSplitCharacter (bool endsWithSplitCharacter)
  Sets IsEndsWithSplitCharacter(). More...
 
virtual bool  IsEndsWithSplitCharacter ()
  Indicates whether TextRenderer::line ends with a splitCharacter. More...
 
virtual iText.Layout.Layout.TextLayoutResult  SetLeftMinWidth (float leftMinWidth)
  Sets min width of the leftmost unbreakable part of the TextRenderer::line after layout. More...
 
virtual float  GetLeftMinWidth ()
  Gets min width of the leftmost unbreakable part of the TextRenderer::line after layout. More...
 
virtual iText.Layout.Layout.TextLayoutResult  SetRightMinWidth (float rightMinWidth)
  Sets min width of the rightmost unbreakable part of the TextRenderer::line after layout. More...
 
virtual float  GetRightMinWidth ()
  Gets min width of the rightmost unbreakable part of the TextRenderer::line after layout. More...
 
- Public Member Functions inherited from iText.Layout.Layout.MinMaxWidthLayoutResult
  MinMaxWidthLayoutResult (int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer)
  Creates min and max width. More...
 
  MinMaxWidthLayoutResult (int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer, IRenderer cause)
  Creates min and max width. More...
 
virtual MinMaxWidth  GetMinMaxWidth ()
  Gets min and max width. More...
 
virtual iText.Layout.Layout.MinMaxWidthLayoutResult  SetMinMaxWidth (MinMaxWidth minMaxWidth)
  Sets min and max width. More...
 
- Public Member Functions inherited from iText.Layout.Layout.LayoutResult
  LayoutResult (int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer)
  Creates the LayoutResult result of layouting }. More...
 
  LayoutResult (int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer, IRenderer cause)
  Creates the LayoutResult result of layouting }. More...
 
virtual int  GetStatus ()
  Gets the status of iText.Layout.Renderer.IRenderer.Layout(LayoutContext). More...
 
virtual void  SetStatus (int status)
  Sets the status of iText.Layout.Renderer.IRenderer.Layout(LayoutContext). More...
 
virtual LayoutArea  GetOccupiedArea ()
  Gets the layout area occupied by the content during layouting. More...
 
virtual IRenderer  GetSplitRenderer ()
  Gets the split renderer created during layouting. More...
 
virtual void  SetSplitRenderer (IRenderer splitRenderer)
  Sets the split renderer. More...
 
virtual IRenderer  GetOverflowRenderer ()
  Gets the overflow renderer created during layouting. More...
 
virtual void  SetOverflowRenderer (IRenderer overflowRenderer)
  Sets the overflow renderer. More...
 
virtual AreaBreak  GetAreaBreak ()
  Gets areaBreak value. More...
 
virtual iText.Layout.Layout.LayoutResult  SetAreaBreak (AreaBreak areaBreak)
  Sets areaBreak value. More...
 
virtual IRenderer  GetCauseOfNothing ()
  Gets the first renderer to produce NOTHING during iText.Layout.Renderer.IRenderer.Layout(LayoutContext) More...
 
override String  ToString ()
 

Package Attributes

bool  wordHasBeenSplit
  Indicates whether some word was split during layout. More...
 
bool  splitForcedByNewline
  Indicates whether split was forced by new line symbol in text or not. More...
 
bool  containsPossibleBreak = false
 
bool  startsWithSplitCharacterWhiteSpace = false
 
bool  endsWithSplitCharacter = false
 
float  leftMinWidth
 
float  rightMinWidth
 
- Package Attributes inherited from iText.Layout.Layout.MinMaxWidthLayoutResult
MinMaxWidth  minMaxWidth
  The iText.Layout.Minmaxwidth.MinMaxWidth value of min and max width. More...
 
- Package Attributes inherited from iText.Layout.Layout.LayoutResult
int  status
  The status of iText.Layout.Renderer.IRenderer.Layout(LayoutContext) which indicates whether the content was added or not and, if yes, was it added fully or partially. More...
 
LayoutArea  occupiedArea
  The area occupied by the content during its layouting. More...
 
IRenderer  splitRenderer
  The split renderer created during layouting. More...
 
IRenderer  overflowRenderer
  The overflow renderer created during layouting. More...
 
AreaBreak  areaBreak
  The iText.Layout.Element.AreaBreak that will be rendered by this object. More...
 
IRenderer  causeOfNothing
  The first renderer to produce NOTHING during iText.Layout.Renderer.IRenderer.Layout(LayoutContext). More...
 

Additional Inherited Members

- Static Public Attributes inherited from iText.Layout.Layout.LayoutResult
const int  FULL = 1
  The status of iText.Layout.Renderer.IRenderer.Layout(LayoutContext) which indicates that the content was fully placed. More...
 
const int  PARTIAL = 2
  The status of iText.Layout.Renderer.IRenderer.Layout(LayoutContext) which indicates that the content was placed partially. More...
 
const int  NOTHING = 3
  The status of iText.Layout.Renderer.IRenderer.Layout(LayoutContext) which indicates that the content was not placed. More...
 

Detailed Description

Represents the result of a text layout.

Constructor & Destructor Documentation

◆ TextLayoutResult() [1/2]

iText.Layout.Layout.TextLayoutResult.TextLayoutResult ( int  status,
LayoutArea  occupiedArea,
IRenderer  splitRenderer,
IRenderer  overflowRenderer 
)
inline

Creates the LayoutResult result of layouting }.

Creates the LayoutResult result of layouting }. The LayoutResult.causeOfNothing will be set as null.

Parameters
status the status of iText.Layout.Renderer.TextRenderer.Layout(LayoutContext)
occupiedArea the area occupied by the content
splitRenderer the renderer to draw the split part of the content
overflowRenderer the renderer to draw the overflowed part of the content

◆ TextLayoutResult() [2/2]

iText.Layout.Layout.TextLayoutResult.TextLayoutResult ( int  status,
LayoutArea  occupiedArea,
IRenderer  splitRenderer,
IRenderer  overflowRenderer,
IRenderer  cause 
)
inline

Creates the LayoutResult result of layouting }.

Parameters
status the status of iText.Layout.Renderer.TextRenderer.Layout(LayoutContext)
occupiedArea the area occupied by the content
splitRenderer the renderer to draw the split part of the content
overflowRenderer the renderer to draw the overflowed part of the content
cause the first renderer to produce LayoutResult.NOTHING

Member Function Documentation

◆ GetLeftMinWidth()

virtual float iText.Layout.Layout.TextLayoutResult.GetLeftMinWidth ( )
inlinevirtual

Gets min width of the leftmost unbreakable part of the TextRenderer::line after layout.

Gets min width of the leftmost unbreakable part of the TextRenderer::line after layout. This value leftMinWidth includes left-side additional width, i.e. left margin, border and padding widths. In case when entire TextRenderer::line is unbreakable, leftMinWidth also includes right-side additional width.

Returns
min width of the leftmost unbreakable part of the TextRenderer::line after layout.

◆ GetRightMinWidth()

virtual float iText.Layout.Layout.TextLayoutResult.GetRightMinWidth ( )
inlinevirtual

Gets min width of the rightmost unbreakable part of the TextRenderer::line after layout.

Gets min width of the rightmost unbreakable part of the TextRenderer::line after layout. This value includes right-side additional width, i.e. right margin, border and padding widths. In case when entire TextRenderer::line is unbreakable, this value must be -1 and right-side additional width must be included in leftMinWidth.

Returns
min width of the leftmost unbreakable part of the TextRenderer::line after layout.

◆ IsContainsPossibleBreak()

virtual bool iText.Layout.Layout.TextLayoutResult.IsContainsPossibleBreak ( )
inlinevirtual

Indicates whether split renderer contains possible break.

Indicates whether split renderer contains possible break. Possible breaks are either whitespaces or split characters.

Returns
true if there's a possible break within the split renderer.
See also
iText.Layout.Splitting.ISplitCharacters

◆ IsEndsWithSplitCharacter()

virtual bool iText.Layout.Layout.TextLayoutResult.IsEndsWithSplitCharacter ( )
inlinevirtual

Indicates whether TextRenderer::line ends with a splitCharacter.

Returns
true if TextRenderer::line ends with a splitCharacter.
See also
iText.Layout.Splitting.ISplitCharacters

◆ IsSplitForcedByNewline()

virtual bool iText.Layout.Layout.TextLayoutResult.IsSplitForcedByNewline ( )
inlinevirtual

Indicates whether split was forced by new line symbol in rendered text.

Indicates whether split was forced by new line symbol in rendered text. The value will be set as true if, for example, the rendered text contains '
' symbol. This value can also be true even if the text was fully placed, but had line break at the end.

Returns
whether split was forced by new line or not.

◆ IsStartsWithSplitCharacterWhiteSpace()

virtual bool iText.Layout.Layout.TextLayoutResult.IsStartsWithSplitCharacterWhiteSpace ( )
inlinevirtual

Indicates whether TextRenderer::line starts with a whitespace.

Returns
true if TextRenderer::line starts with a whitespace.

◆ IsWordHasBeenSplit()

virtual bool iText.Layout.Layout.TextLayoutResult.IsWordHasBeenSplit ( )
inlinevirtual

Indicates whether some word in a rendered text was split during layout.

Indicates whether some word in a rendered text was split during layout. The value will be set as true if, for example, the rendered words width is bigger than the width of layout area.

Returns
whether some word was split or not.

◆ SetContainsPossibleBreak()

virtual iText.Layout.Layout.TextLayoutResult iText.Layout.Layout.TextLayoutResult.SetContainsPossibleBreak ( bool  containsPossibleBreak )
inlinevirtual

Sets IsContainsPossibleBreak().

Parameters
containsPossibleBreak indicates that split renderer contains possible break.
Returns

this layout result the setting was applied on.

See also
IsContainsPossibleBreak()

◆ SetEndsWithSplitCharacter()

virtual iText.Layout.Layout.TextLayoutResult iText.Layout.Layout.TextLayoutResult.SetEndsWithSplitCharacter ( bool  endsWithSplitCharacter )
inlinevirtual

Sets IsEndsWithSplitCharacter().

Parameters
endsWithSplitCharacter indicates if TextRenderer::line ends with a splitCharacter.
Returns

this layout result the setting was applied on.

See also
IsEndsWithSplitCharacter()

◆ SetLeftMinWidth()

virtual iText.Layout.Layout.TextLayoutResult iText.Layout.Layout.TextLayoutResult.SetLeftMinWidth ( float  leftMinWidth )
inlinevirtual

Sets min width of the leftmost unbreakable part of the TextRenderer::line after layout.

Sets min width of the leftmost unbreakable part of the TextRenderer::line after layout. This value includes left-side additional width, i.e. left margin, border and padding widths. In case when entire TextRenderer::line is unbreakable, leftMinWidth also includes right-side additional width.

Parameters
leftMinWidth min width of the leftmost unbreakable part of the TextRenderer::line after layout.
Returns

this layout result the setting was applied on.

◆ SetRightMinWidth()

virtual iText.Layout.Layout.TextLayoutResult iText.Layout.Layout.TextLayoutResult.SetRightMinWidth ( float  rightMinWidth )
inlinevirtual

Sets min width of the rightmost unbreakable part of the TextRenderer::line after layout.

Sets min width of the rightmost unbreakable part of the TextRenderer::line after layout. This value includes right-side additional width, i.e. right margin, border and padding widths. In case when entire TextRenderer::line is unbreakable, this value must be -1 and right-side additional width must be included in leftMinWidth.

Parameters
rightMinWidth min width of the rightmost unbreakable part of the TextRenderer::line after layout.
Returns

this layout result the setting was applied on.

◆ SetSplitForcedByNewline()

virtual iText.Layout.Layout.TextLayoutResult iText.Layout.Layout.TextLayoutResult.SetSplitForcedByNewline ( bool  isSplitForcedByNewline )
inlinevirtual

Sets IsSplitForcedByNewline()

Parameters
isSplitForcedByNewline indicates that split was forced by new line symbol in rendered text.
Returns

this layout result the setting was applied on.

See also
SetSplitForcedByNewline(bool)

◆ SetStartsWithSplitCharacterWhiteSpace()

virtual iText.Layout.Layout.TextLayoutResult iText.Layout.Layout.TextLayoutResult.SetStartsWithSplitCharacterWhiteSpace ( bool  startsWithSplitCharacterWhiteSpace )
inlinevirtual

Sets IsStartsWithSplitCharacterWhiteSpace().

Parameters
startsWithSplitCharacterWhiteSpace indicates if TextRenderer::line starts with a split character that is also a whitespace.
Returns

this layout result the setting was applied on.

See also
IsStartsWithSplitCharacterWhiteSpace()

◆ SetWordHasBeenSplit()

virtual iText.Layout.Layout.TextLayoutResult iText.Layout.Layout.TextLayoutResult.SetWordHasBeenSplit ( bool  wordHasBeenSplit )
inlinevirtual

Sets wordHasBeenSplit

Parameters
wordHasBeenSplit indicates that some word was split during layout.
Returns

this layout result the setting was applied on

See also
wordHasBeenSplit

Member Data Documentation

◆ splitForcedByNewline

bool iText.Layout.Layout.TextLayoutResult.splitForcedByNewline
package

Indicates whether split was forced by new line symbol in text or not.

◆ wordHasBeenSplit

bool iText.Layout.Layout.TextLayoutResult.wordHasBeenSplit
package

Indicates whether some word was split during layout.