Class: Cairo::PathData
- Inherits:
-
Object
show all
- Includes:
- Enumerable
- Defined in:
- ext/cairo/rb_cairo_path.c
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Object
52
53
54
55
56
57
58
|
# File 'ext/cairo/rb_cairo_path.c', line 52
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;
}
|
Instance Method Details
#close_path? ⇒ Boolean
81
82
83
84
85
86
|
# File 'ext/cairo/rb_cairo_path.c', line 81
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? ⇒ Boolean
74
75
76
77
78
79
|
# File 'ext/cairo/rb_cairo_path.c', line 74
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 ⇒ Object
88
89
90
91
92
|
# File 'ext/cairo/rb_cairo_path.c', line 88
static VALUE
cr_path_data_each (VALUE self)
{
return rb_ary_each (rb_ivar_get (self, id_at_points));
}
|
#line_to? ⇒ Boolean
67
68
69
70
71
72
|
# File 'ext/cairo/rb_cairo_path.c', line 67
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? ⇒ Boolean
60
61
62
63
64
65
|
# File 'ext/cairo/rb_cairo_path.c', line 60
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 ⇒ Object
Also known as:
to_ary
95
96
97
98
99
100
101
|
# File 'ext/cairo/rb_cairo_path.c', line 95
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));
}
|