Class: KvgCharacterRecognition::KvgParser::SVG_M

Inherits:
Object
  • Object
show all
Defined in:
lib/kvg_character_recognition/kvg_parser.rb

Overview

SVG_M represents the moveto command. SVG Syntax is: m x y It sets the current cursor to the point (x,y). As always, capitalization denotes absolute values. Takes a Point as argument. If given 2 Points, the second argument is treated as the current cursor.

Instance Method Summary collapse

Constructor Details

#initialize(p1, p2 = Point.new(0,0)) ⇒ SVG_M

Returns a new instance of SVG_M.



47
48
49
# File 'lib/kvg_character_recognition/kvg_parser.rb', line 47

def initialize(p1, p2 = Point.new(0,0))
  @p = p1 + p2
end

Instance Method Details

#current_cursorObject



55
56
57
# File 'lib/kvg_character_recognition/kvg_parser.rb', line 55

def current_cursor
  return @p
end

#to_pointsObject



51
52
53
# File 'lib/kvg_character_recognition/kvg_parser.rb', line 51

def to_points
  return []
end