Class: Cairo::PathLineTo

Inherits:
PathData show all
Defined in:
ext/cairo/rb_cairo_path.c

Instance Method Summary collapse

Methods inherited from PathData

#close_path?, #curve_to?, #each, #line_to?, #move_to?, #to_a

Constructor Details

#initializeObject



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'ext/cairo/rb_cairo_path.c', line 157

static VALUE
cr_path_line_to_initialize (int argc, VALUE *argv, VALUE self)
{
  VALUE point, x, y;
  VALUE super_argv[2];

  rb_scan_args (argc, argv, "11", &x, &y);

  if (argc == 1)
    point = x;
  else
    point = cr_point_new (x, y);

  super_argv[0] = INT2NUM (CAIRO_PATH_LINE_TO);
  super_argv[1] = rb_ary_new3 (1, point);
  rb_call_super (2, super_argv);
  return Qnil;
}