class

CrImage::Font::TextLayout

Inherits Reference / Object

TextLayout represents the layout information for multi-line text.

Contains the split lines, their heights, and total dimensions after word wrapping and line breaking calculations.

Properties:

  • lines : Array of text lines after wrapping
  • line_heights : Height of each line in pixels
  • total_height : Total height of all lines
  • max_width : Maximum width of any line

Constructors

new(lines : Array(String), line_heights : Array(Int32), total_height : Int32, max_width : Int32)
Source

Instance methods

line_heights
Source
line_heights=(line_heights : Array(Int32))
Source
lines
Source
lines=(lines : Array(String))
Source
max_width
Source
max_width=(max_width : Int32)
Source
total_height
Source
total_height=(total_height : Int32)
Source