Class: PkiExpress::PadesVisualRectangle
- Inherits:
-
Object
- Object
- PkiExpress::PadesVisualRectangle
- Defined in:
- lib/pki_express/pades_visual_rectangle.rb
Instance Attribute Summary collapse
-
#bottom ⇒ Object
Returns the value of attribute bottom.
-
#height ⇒ Object
Returns the value of attribute height.
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
-
#top ⇒ Object
Returns the value of attribute top.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize ⇒ PadesVisualRectangle
constructor
A new instance of PadesVisualRectangle.
- #set_height_bottom_anchored(height, bottom) ⇒ Object
- #set_height_centered(height) ⇒ Object
- #set_height_top_anchored(height, top) ⇒ Object
- #set_horizontal_stretch(left, right) ⇒ Object
- #set_vertical_stretch(top, bottom) ⇒ Object
- #set_width_centered(width) ⇒ Object
- #set_width_left_anchored(width, left) ⇒ Object
- #set_width_right_anchored(width, right) ⇒ Object
- #to_model ⇒ Object
Constructor Details
#initialize ⇒ PadesVisualRectangle
Returns a new instance of PadesVisualRectangle.
5 6 7 8 9 10 11 12 |
# 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 |
Instance Attribute Details
#bottom ⇒ Object
Returns the value of attribute bottom.
3 4 5 |
# File 'lib/pki_express/pades_visual_rectangle.rb', line 3 def bottom @bottom end |
#height ⇒ Object
Returns the value of attribute height.
3 4 5 |
# File 'lib/pki_express/pades_visual_rectangle.rb', line 3 def height @height end |
#left ⇒ Object
Returns the value of attribute left.
3 4 5 |
# File 'lib/pki_express/pades_visual_rectangle.rb', line 3 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
3 4 5 |
# File 'lib/pki_express/pades_visual_rectangle.rb', line 3 def right @right end |
#top ⇒ Object
Returns the value of attribute top.
3 4 5 |
# File 'lib/pki_express/pades_visual_rectangle.rb', line 3 def top @top end |
#width ⇒ Object
Returns the value of attribute width.
3 4 5 |
# File 'lib/pki_express/pades_visual_rectangle.rb', line 3 def width @width end |
Instance Method Details
#set_height_bottom_anchored(height, bottom) ⇒ Object
50 51 52 53 54 |
# 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) ⇒ Object
38 39 40 41 42 |
# 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) ⇒ Object
44 45 46 47 48 |
# 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) ⇒ Object
32 33 34 35 36 |
# 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) ⇒ Object
56 57 58 59 60 |
# 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) ⇒ Object
14 15 16 17 18 |
# 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) ⇒ Object
20 21 22 23 24 |
# 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) ⇒ Object
26 27 28 29 30 |
# 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 ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# 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 |