def line args, key_args
      arrow, arrowshape, capstyle, joinstyle, smooth, splinesteps =
      key_args.values_at(
        *%w{arrow arrowshape capstyle joinstyle smooth splinesteps})

      proc do |tkaroid, cos_r, sin_r|
        x = tkaroid.x
        y = tkaroid.y
        params = tkaroid.params

        coords = []
        points = args.map {|arg| arg[params] rescue arg}
        points.each_slice(2) do |xv, yv|
          coords << x + xv * cos_r - yv * sin_r
          coords << y + xv * sin_r + yv * cos_r
        end
        
        config = {}
        handle_generic_config(config, params, key_args)
        
        if arrow
          config[:arrow] = arrow[params] rescue arrow
        end
        if arrowshape
          val = arrowshape[params] rescue arrowshape
          val = val.split("+").map{|s| Integer(s)}
          config[:arrowshape] = val
        end
        if capstyle
          config[:capstyle] = capstyle[params] rescue capstyle
        end
        if joinstyle
          config[:joinstyle] = joinstyle[params] rescue joinstyle
        end
        if smooth
          config[:smooth] = smooth[params] rescue smooth
        end
        if splinesteps
          config[:splinesteps] = splinesteps[params] rescue splinesteps
        end

        [TkcLine, coords, config]
      end
    end
def line args, key_args
      arrow, arrowshape, capstyle, joinstyle, smooth, splinesteps =
      key_args.values_at(
        *%w{arrow arrowshape capstyle joinstyle smooth splinesteps})

      proc do |tkaroid, cos_r, sin_r|
        x = tkaroid.x
        y = tkaroid.y
        params = tkaroid.params

        coords = []
        points = args.map {|arg| arg[params] rescue arg}
        points.each_slice(2) do |xv, yv|
          coords << x + xv * cos_r - yv * sin_r
          coords << y + xv * sin_r + yv * cos_r
        end
        
        config = {}
        handle_generic_config(config, params, key_args)
        
        if arrow
          config[:arrow] = arrow[params] rescue arrow
        end
        if arrowshape
          val = arrowshape[params] rescue arrowshape
          val = val.split("+").map{|s| Integer(s)}
          config[:arrowshape] = val
        end
        if capstyle
          config[:capstyle] = capstyle[params] rescue capstyle
        end
        if joinstyle
          config[:joinstyle] = joinstyle[params] rescue joinstyle
        end
        if smooth
          config[:smooth] = smooth[params] rescue smooth
        end
        if splinesteps
          config[:splinesteps] = splinesteps[params] rescue splinesteps
        end

        [TkcLine, coords, config]
      end
    end
lineX1,Y1,X2,Y2...,key:val...

  arrow where (none, first, last, both)
  arrowshape shape
  capstyle style (butt, projecting, round)
  joinstyle style (miter, bevel, round)
  smooth smoothMethod (true or false)
  splinesteps number