61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/zebra/zpl/graphic.rb', line 61
def to_zpl
check_attributes
graphic = case graphic_type
when "B"
"B#{graphic_width},#{graphic_height},#{line_thickness},#{color},#{rounding_degree}"
when "C"
"C#{graphic_width},#{line_thickness},#{color}"
when "D"
"D#{graphic_width},#{graphic_height},#{line_thickness},#{color},#{orientation}"
when "E"
"E#{graphic_width},#{graphic_height},#{line_thickness},#{color}"
when "S"
sym = !symbol_type.nil? ? "^FD#{symbol_type}" : ''
"S,#{graphic_height},#{graphic_width}#{sym}"
end
"^FW#{rotation}^FO#{x},#{y}^G#{graphic}^FS"
end
|