Class: Zebra::Zpl::Box

Inherits:
Object
  • Object
show all
Includes:
Printable
Defined in:
lib/zebra/zpl/box.rb

Defined Under Namespace

Classes: InvalidLineThickness

Instance Attribute Summary collapse

Attributes included from Printable

#data, #margin, #position, #x, #y

Instance Method Summary collapse

Methods included from Printable

#initialize, #justification, #justification=, #rotation, #rotation=

Instance Attribute Details

#box_heightObject

Returns the value of attribute box_height.



10
11
12
# File 'lib/zebra/zpl/box.rb', line 10

def box_height
  @box_height
end

#box_widthObject

Returns the value of attribute box_width.



10
11
12
# File 'lib/zebra/zpl/box.rb', line 10

def box_width
  @box_width
end

#line_thicknessObject

Returns the value of attribute line_thickness.



10
11
12
# File 'lib/zebra/zpl/box.rb', line 10

def line_thickness
  @line_thickness
end

#widthObject

Returns the value of attribute width.



10
11
12
# File 'lib/zebra/zpl/box.rb', line 10

def width
  @width
end

Instance Method Details

#to_zplObject



30
31
32
33
34
# File 'lib/zebra/zpl/box.rb', line 30

def to_zpl
  check_attributes
  # "^FO#{x},#{y}^GB#{box_width},#{box_height},#{line_thickness}^FS"
  "^FO#{x},#{y}^GB#{box_width},#{box_height},#{line_thickness}^FS"
end