Module: Cairo::PSLevel
- Defined in:
- lib/cairo.rb,
ext/cairo/rb_cairo_constants.c
Constant Summary collapse
- LEVEL_2 =
INT2FIX (CAIRO_PS_LEVEL_2)
- LEVEL_3 =
INT2FIX (CAIRO_PS_LEVEL_3)
Class Method Summary collapse
Class Method Details
.list ⇒ Object
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'ext/cairo/rb_cairo_constants.c', line 273
static VALUE
cr_ps_get_levels (VALUE self)
{
VALUE rb_levels;
const cairo_ps_level_t *levels;
int i, n_levels;
cairo_ps_get_levels (&levels, &n_levels);
rb_levels = rb_ary_new2 (n_levels);
for (i = 0; i < n_levels; i++)
{
rb_ary_push (rb_levels, INT2NUM (levels[i]));
}
return rb_levels;
}
|
.name ⇒ Object
291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'ext/cairo/rb_cairo_constants.c', line 291
static VALUE
cr_ps_level_to_string (int argc, VALUE *argv, VALUE self)
{
if (argc == 0)
{
return rb_call_super (argc, argv);
}
else
{
VALUE level;
rb_scan_args (argc, argv, "1", &level);
return rb_str_new2 (cairo_ps_level_to_string (RVAL2CRPSLEVEL (level)));
}
}
|
.names ⇒ Object
82 83 84 |
# File 'lib/cairo.rb', line 82 def names list.collect {|version| name(version)} end |