class HexaPDF::Layout::WidthFromPolygon

Included Modules

Utility class for generating width specifications for TextLayouter#fit from polygons.

Public Class Methods

new(polygon, offset = 0)

Creates a new object for the given polygon (or polygon set) and immediately prepares it so that call can be used.

The offset argument specifies the vertical offset from the top at which calculations should start.

Public Instance Methods

call(height, line_height)

Returns the width specification for the given values with respect to the wrapped polygon.