Class: Zebra::Epl::Text

Inherits:
Object
  • Object
show all
Includes:
Printable
Defined in:
lib/zebra/epl/text.rb

Instance Attribute Summary collapse

Attributes included from Printable

#data, #position, #x, #y

Instance Method Summary collapse

Methods included from Printable

#initialize, #rotation, #rotation=

Instance Attribute Details

#fontObject

Returns the value of attribute font.



8
9
10
# File 'lib/zebra/epl/text.rb', line 8

def font
  @font
end

Instance Method Details

#h_multiplierObject



24
25
26
# File 'lib/zebra/epl/text.rb', line 24

def h_multiplier
  @h_multiplier || HorizontalMultiplier::VALUE_1
end

#h_multiplier=(multiplier) ⇒ Object



36
37
38
39
# File 'lib/zebra/epl/text.rb', line 36

def h_multiplier=(multiplier)
  HorizontalMultiplier.validate_multiplier multiplier
  @h_multiplier = multiplier
end


20
21
22
# File 'lib/zebra/epl/text.rb', line 20

def print_mode
  @print_mode || PrintMode::NORMAL
end


15
16
17
18
# File 'lib/zebra/epl/text.rb', line 15

def print_mode=(mode)
  PrintMode.validate_mode mode
  @print_mode = mode
end

#to_eplObject



46
47
48
49
# File 'lib/zebra/epl/text.rb', line 46

def to_epl
  check_attributes
  ["A#{x}", y, rotation, font, h_multiplier, v_multiplier, print_mode, "\"#{data}\""].join(",")
end

#v_multiplierObject



28
29
30
# File 'lib/zebra/epl/text.rb', line 28

def v_multiplier
  @v_multiplier || VerticalMultiplier::VALUE_1
end

#v_multiplier=(multiplier) ⇒ Object



41
42
43
44
# File 'lib/zebra/epl/text.rb', line 41

def v_multiplier=(multiplier)
  VerticalMultiplier.validate_multiplier multiplier
  @v_multiplier = multiplier
end