Sha256: 30705a19c92e05f50faf103c1ba6cea2d264d4dd5ca58ccfa1777250b482e07b

Contents?: true

Size: 619 Bytes

Versions: 22

Compression:

Stored size: 619 Bytes

Contents

# -----------------------------------------------------------------------------
# Draws text for a gauge
#
# Author:: Fernand Galiana
# -----------------------------------------------------------------------------
require 'ziya/gauges/support/base'

module Ziya::Gauges::Support
  class Text < Base  
    has_attribute :x, :y, :width, :height, :rotation, :font, :bold, :size, :align,
                  :color, :alpha, :text
                  
    def flatten( xml )
      opts = options
      txt = opts.delete( :text )
      xml.text( opts ) do
        xml.text! txt.to_s
      end
    end                  
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
derailed-ziya-2.0.4 lib/ziya/gauges/support/text.rb
derailed-ziya-2.0.6 lib/ziya/gauges/support/text.rb
derailed-ziya-2.0.8 lib/ziya/gauges/support/text.rb
derailed-ziya-2.1.0 lib/ziya/gauges/support/text.rb
derailed-ziya-2.1.1 lib/ziya/gauges/support/text.rb
derailed-ziya-2.1.2 lib/ziya/gauges/support/text.rb
derailed-ziya-2.1.3 lib/ziya/gauges/support/text.rb
derailed-ziya-2.1.4 lib/ziya/gauges/support/text.rb
derailed-ziya-2.1.5 lib/ziya/gauges/support/text.rb
ziya-2.3.0 lib/ziya/gauges/support/text.rb
ziya-2.1.9 lib/ziya/gauges/support/text.rb
ziya-2.1.8 lib/ziya/gauges/support/text.rb
ziya-2.1.7 lib/ziya/gauges/support/text.rb
ziya-2.1.6 lib/ziya/gauges/support/text.rb
ziya-2.0.2 lib/ziya/gauges/support/text.rb
ziya-2.0.1 lib/ziya/gauges/support/text.rb
ziya-2.0.0 lib/ziya/gauges/support/text.rb
ziya-2.0.4 lib/ziya/gauges/support/text.rb
ziya-2.0.7 lib/ziya/gauges/support/text.rb
ziya-2.0.5 lib/ziya/gauges/support/text.rb