# module Cairo::PSLevel

cairo_ps_level_t

### Constants

LEVEL_2
LEVEL_3

### Public Class Methods

list() click to toggle source

    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(*args) click to toggle source

    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() click to toggle source

    # File lib/cairo.rb, line 80
    def names
      list.collect {|version| name(version)}
    end