iText 7 7.1.9 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 splitted 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...
 
- Public Member Functions inherited from iText.Layout.Layout.MinMaxWidthLayoutResult
  MinMaxWidthLayoutResult (int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer)
 
  MinMaxWidthLayoutResult (int status, LayoutArea occupiedArea, IRenderer splitRenderer, IRenderer overflowRenderer, IRenderer cause)
 
virtual MinMaxWidth  GetMinMaxWidth ()
 
virtual iText.Layout.Layout.MinMaxWidthLayoutResult  SetMinMaxWidth (MinMaxWidth minMaxWidth)
 
- 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 ()
 
virtual iText.Layout.Layout.LayoutResult  SetAreaBreak (AreaBreak areaBreak)
 
virtual IRenderer  GetCauseOfNothing ()
  Gets the first renderer to produce NOTHING during iText.Layout.Renderer.IRenderer.Layout(LayoutContext) More...
 
override String  ToString ()
 

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 splitted 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 splitted 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

◆ 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.

◆ IsWordHasBeenSplit()

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

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

Indicates whether some word in a rendered text was splitted 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 splitted or not.

◆ 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)

◆ SetWordHasBeenSplit()

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

Sets wordHasBeenSplit

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

this layout result the setting was applied on

See also
wordHasBeenSplit