Class: Wicket::Commands::V

Inherits:
Wicket::Command show all
Defined in:
lib/wicket/commands/v.rb

Constant Summary collapse

ARGS =
1
ARG_LIST =
[:y]

Instance Attribute Summary

Attributes inherited from Wicket::Command

#cursor_start, #x, #y

Instance Method Summary collapse

Methods inherited from Wicket::Command

#absolute_y, #arguments, #cursor_end, from_code, #subpath=, #to_wkt

Constructor Details

#initialize(absolute, cursor_start, subpath, opts, y) ⇒ V

Returns a new instance of V.



7
8
9
10
11
12
13
# File 'lib/wicket/commands/v.rb', line 7

def initialize(absolute,cursor_start,subpath,opts,y)
  @absolute = absolute
  @cursor_start = cursor_start
  @subpath = subpath
  @opts = opts
  @y = y
end

Instance Method Details

#absolute_xObject



15
16
17
# File 'lib/wicket/commands/v.rb', line 15

def absolute_x
  cursor_start.x
end

#to_svg(opts = {}) ⇒ Object



19
20
21
22
# File 'lib/wicket/commands/v.rb', line 19

def to_svg(opts={})
  o = @opts.merge(opts)
  "V #{Utilities.format(absolute_y,o)}"
end