class HexaPDF::Layout::Frame::FitData

Internal class for storing data of a fitted box.

Attributes

available_height[RW]

The available height for this particular box.

available_width[RW]

The available width for this particular box.

box[RW]

The box that was fitted into the frame.

margin_left[RW]

The left margin to use instead of box.style.margin.left.

margin_right[RW]

The right margin to use instead of box.style.margin.right.

margin_top[RW]

The top margin to use instead of box.style.margin.top.

Public Class Methods

new() click to toggle source

Initialize the object by calling reset.

# File lib/hexapdf/layout/frame.rb, line 114
def initialize
  reset
end

Public Instance Methods

reset(box = nil, available_width = 0, available_height = 0) click to toggle source

Resets the object.

# File lib/hexapdf/layout/frame.rb, line 119
def reset(box = nil, available_width = 0, available_height = 0)
  @box = box
  @available_width = available_width
  @available_height = available_height
  @margin_left = @margin_right = @margin_top = 0
end