module Cairo::SVGVersion - cairo-1.12.9 Documentation

# module Cairo::SVGVersion

cairo_svg_version_t

### Constants

VERSION_1_1
VERSION_1_2

### Public Class Methods

list() click to toggle source

    static VALUE
    cr_svg_get_versions (VALUE self)
    {
      VALUE rb_versions;
      int i, num_versions;
      cairo_svg_version_t const *versions;

      cairo_svg_get_versions (&versions, &num_versions);

      rb_versions = rb_ary_new2 (num_versions);

      for (i = 0; i < num_versions; i++)
        {
          rb_ary_push (rb_versions, INT2NUM (versions[i]));
        }

      return rb_versions;
    }

name(*args) click to toggle source

    static VALUE
    cr_svg_version_to_string (int argc, VALUE *argv, VALUE self)
    {
      if (argc == 0)
        {
          return rb_call_super (argc, argv);
        }
      else
        {
          VALUE version;
          const char *ver_str;
          rb_scan_args (argc, argv, "1", &version);
          ver_str = cairo_svg_version_to_string (RVAL2CRSVGVERSION(version));
          return rb_str_new2 (ver_str);
        }
    }

### Public Instance Methods

names() click to toggle source

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