Parent

Class/Module Index [+]

Quicksearch

Origami::Text::State

Attributes

char_spacing[RW]
font[RW]
font_size[RW]
leading[RW]
rendering_mode[RW]
scaling[RW]
text_knockout[RW]
text_line_matrix[RW]
text_matrix[RW]
text_rendering_matrix[RW]
text_rise[RW]
word_spacing[RW]

Public Class Methods

new() click to toggle source
# File lib/origami/graphics/text.rb, line 61
def initialize
  self.reset
end

Public Instance Methods

begin_text_object() click to toggle source
# File lib/origami/graphics/text.rb, line 92
def begin_text_object
  if is_in_text_object?
    raise TextStateError, 
      "Cannot start a text object within an existing text object."
  end

  @text_object = true
  @text_matrix = 
  @text_line_matrix = 
  @text_rendering_matrix = Matrix.identity(3)
end
end_text_object() click to toggle source
# File lib/origami/graphics/text.rb, line 104
def end_text_object
  unless is_in_text_object?
    raise TextStateError, 
      "Cannot end text object : no previous text object has begun."
  end

  @text_object = false
  @text_matrix = 
  @text_line_matrix = 
  @text_rendering_matrix = nil
end
is_in_text_object?() click to toggle source
# File lib/origami/graphics/text.rb, line 88
def is_in_text_object?
  @text_object
end
reset() click to toggle source
# File lib/origami/graphics/text.rb, line 65
def reset
  
  @char_spacing = 0
  @word_spacing = 0
  @scaling = 100
  @leading = 0
  @font = nil
  @font_size = nil
  @rendering_mode = Rendering::FILL
  @text_rise = 0
  @text_knockout = true

  #
  # Text objects
  #

  @text_object = false
  @text_matrix = 
  @text_line_matrix = 
  @text_rendering_matrix = nil

end

[Validate]

Generated with the Darkfish Rdoc Generator 2.