Sha256: 6aa1ed46422ffad919c9b40e01fbcbbb50ae455c75c90c29df5c14f3b34a89f1

Contents?: true

Size: 415 Bytes

Versions: 6

Compression:

Stored size: 415 Bytes

Contents

require "zebra/zpl/printable"

module Zebra
  module Zpl
    class Raw
      include Printable

      attr_reader :width

      def width=(width)
        unless margin.nil? || margin < 1
          @width = (width - (margin * 2))
        else
          @width = width || 0
        end
      end

      def to_zpl
        # check_attributes
        "^FW#{rotation}^FO#{x},#{y}#{data}^FS"
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
zebra-zpl-1.1.4 lib/zebra/zpl/raw.rb
zebra-zpl-1.1.3 lib/zebra/zpl/raw.rb
zebra-zpl-1.1.2 lib/zebra/zpl/raw.rb
zebra-zpl-1.1.1 lib/zebra/zpl/raw.rb
zebra-zpl-1.1.0 lib/zebra/zpl/raw.rb
zebra-zpl-1.0.5 lib/zebra/zpl/raw.rb