class PkiExpress::PadesVisualRectangle

Attributes

bottom[RW]
height[RW]
left[RW]
right[RW]
top[RW]
width[RW]

Public Class Methods

new() click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 5
def initialize
  @left = nil
  @top = nil
  @right = nil
  @bottom = nil
  @width = nil
  @height = nil
end

Public Instance Methods

set_height_bottom_anchored(height, bottom) click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 50
def set_height_bottom_anchored(height, bottom)
  @height = height
  @top = nil
  @bottom = bottom
end
set_height_centered(height) click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 38
def set_height_centered(height)
  @height = height
  @top = nil
  @bottom = nil
end
set_height_top_anchored(height, top) click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 44
def set_height_top_anchored(height, top)
  @height = height
  @top = top
  @bottom = nil
end
set_horizontal_stretch(left, right) click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 32
def set_horizontal_stretch(left, right)
  @width = nil
  @left = left
  @right = right
end
set_vertical_stretch(top, bottom) click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 56
def set_vertical_stretch(top, bottom)
  @height = nil
  @top = top
  @bottom = bottom
end
set_width_centered(width) click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 14
def set_width_centered(width)
  @width = width
  @left = nil
  @right = nil
end
set_width_left_anchored(width, left) click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 20
def set_width_left_anchored(width, left)
  @width = width
  @left = left
  @right = nil
end
set_width_right_anchored(width, right) click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 26
def set_width_right_anchored(width, right)
  @width = width
  @left = nil
  @right = right
end
to_model() click to toggle source
# File lib/pki_express/pades_visual_rectangle.rb, line 62
def to_model
  {
      left: @left,
      top: @top,
      right: @right,
      bottom: @bottom,
      width: @width,
      height: @height,
  }
end