class Cairo::PathData

Public Class Methods

new(p1, p2) click to toggle source
static VALUE
cr_path_data_initialize (VALUE self, VALUE type, VALUE points)
{
  rb_ivar_set (self, id_at_type, type);
  rb_ivar_set (self, id_at_points, points);
  return Qnil;
}

Public Instance Methods

close_path?() click to toggle source
static VALUE
cr_path_data_close_path_p (VALUE self)
{
  return CBOOL2RVAL (RVAL2CRPATHDATATYPE (rb_ivar_get (self, id_at_type)) ==
                     CAIRO_PATH_CLOSE_PATH);
}
curve_to?() click to toggle source
static VALUE
cr_path_data_curve_to_p (VALUE self)
{
  return CBOOL2RVAL (RVAL2CRPATHDATATYPE (rb_ivar_get (self, id_at_type)) ==
                     CAIRO_PATH_CURVE_TO);
}
each() click to toggle source
static VALUE
cr_path_data_each (VALUE self)
{
  return rb_ary_each (rb_ivar_get (self, id_at_points));
}
line_to?() click to toggle source
static VALUE
cr_path_data_line_to_p (VALUE self)
{
  return CBOOL2RVAL (RVAL2CRPATHDATATYPE (rb_ivar_get (self, id_at_type)) ==
                     CAIRO_PATH_LINE_TO);
}
move_to?() click to toggle source
static VALUE
cr_path_data_move_to_p (VALUE self)
{
  return CBOOL2RVAL (RVAL2CRPATHDATATYPE (rb_ivar_get (self, id_at_type)) ==
                     CAIRO_PATH_MOVE_TO);
}
to_a() click to toggle source
static VALUE
cr_path_data_to_a (VALUE self)
{
  return rb_ary_new3 (2,
                      rb_ivar_get (self, id_at_type),
                      rb_ivar_get (self, id_at_points));
}
Also aliased as: to_ary
to_ary()
Alias for: to_a