Sha256: 7eab7327c88f4b4781c4c37b6b1ebdb85651d2111f98deddda7a4d162df6c64c
Contents?: true
Size: 696 Bytes
Versions: 13
Compression:
Stored size: 696 Bytes
Contents
module Savage module Directions class ArcTo < PointTarget attr_accessor :radius, :rotation, :large_arc, :sweep def initialize(radius_x, radius_y, rotation, large_arc, sweep, target_x, target_y, absolute=true) super(target_x, target_y, absolute) @radius = Point.new(radius_x, radius_y) @rotation = rotation @large_arc = large_arc @sweep = sweep end def to_command command_code << "#{@radius.x} #{@radius.y} #{@rotation} #{bool_to_int(@large_arc)} #{bool_to_int(@sweep)} #{target.x} #{target.y}".gsub(/ -/,'-') end def command_code (absolute?) ? 'A' : 'a' end end end end
Version data entries
13 entries across 13 versions & 1 rubygems