class Languages::Epl2::Barcode1D
Constants
- BarcodeClasses
Public Class Methods
new(code_type, opts = {})
click to toggle source
# File lib/languages/epl2/barcode.rb, line 19 def initialize(code_type, opts = {}) @font = opts[:font] || Font.new #defaults @type,@nb_width,@wb_width,@height,@human_readable = BarcodeClasses[code_type] opts[:at] = [0,0] unless opts.has_key? :at @x, @y = opts[:at].pop(2) @text = opts[:text] || "" end
Public Instance Methods
render()
click to toggle source
# File lib/languages/epl2/barcode.rb, line 28 def render "B#{@x},#{@y},#{@font.rotation},#{@type},#{@nb_width},#{@wb_width},#{@height},#{@human_readable},\"#{@text}\"" end