Class: Zebra::Zpl::Box
- Inherits:
-
Object
- Object
- Zebra::Zpl::Box
- Includes:
- Printable
- Defined in:
- lib/zebra/zpl/box.rb
Defined Under Namespace
Classes: InvalidColorError, InvalidLineThickness, InvalidRoundingDegree
Instance Attribute Summary collapse
-
#box_height ⇒ Object
Returns the value of attribute box_height.
-
#box_width ⇒ Object
Returns the value of attribute box_width.
-
#color ⇒ Object
Returns the value of attribute color.
-
#line_thickness ⇒ Object
Returns the value of attribute line_thickness.
-
#rounding_degree ⇒ Object
Returns the value of attribute rounding_degree.
-
#width ⇒ Object
Returns the value of attribute width.
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_height ⇒ Object
Returns the value of attribute box_height.
12 13 14 |
# File 'lib/zebra/zpl/box.rb', line 12 def box_height @box_height end |
#box_width ⇒ Object
Returns the value of attribute box_width.
12 13 14 |
# File 'lib/zebra/zpl/box.rb', line 12 def box_width @box_width end |
#color ⇒ Object
Returns the value of attribute color.
12 13 14 |
# File 'lib/zebra/zpl/box.rb', line 12 def color @color end |
#line_thickness ⇒ Object
Returns the value of attribute line_thickness.
12 13 14 |
# File 'lib/zebra/zpl/box.rb', line 12 def line_thickness @line_thickness end |
#rounding_degree ⇒ Object
Returns the value of attribute rounding_degree.
12 13 14 |
# File 'lib/zebra/zpl/box.rb', line 12 def rounding_degree @rounding_degree end |
#width ⇒ Object
Returns the value of attribute width.
12 13 14 |
# File 'lib/zebra/zpl/box.rb', line 12 def width @width end |
Instance Method Details
#to_zpl ⇒ Object
42 43 44 45 46 |
# File 'lib/zebra/zpl/box.rb', line 42 def to_zpl check_attributes puts "The Box class is deprecated. Please switch to the Graphic class (graphic_type = box)." unless ENV['RUBY_ENV'] == 'test' "^FO#{x},#{y}^GB#{box_width},#{box_height},#{line_thickness},#{color},#{rounding_degree}^FS" end |