Class: RuPov::Objects::FiniteSolidPrimitives::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/rupov.rb

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#<<, #to_s

Constructor Details

#initialize(font, text, thickness, offset = 0) {|_self| ... } ⇒ Text

Returns a new instance of Text.

Yields:

  • (_self)

Yield Parameters:



165
166
167
168
169
170
# File 'lib/rupov.rb', line 165

def initialize( font, text, thickness, offset = 0 )
    super('text')
    # FIXME these values aren't dynamic
    self << Methods::MultiValue.new( [Methods::MultiValue.new( [Methods::MultiValue.new( [thickness, offset], "\"#{text}\"")] ,"\"#{font}\"")], 'ttf' )
    yield(self) if block_given? and self.class == Text
end