Module: Cairo::SVGVersion
- Defined in:
- lib/cairo.rb,
ext/cairo/rb_cairo_constants.c
Constant Summary collapse
- VERSION_1_1 =
INT2FIX (CAIRO_SVG_VERSION_1_1)
- VERSION_1_2 =
INT2FIX (CAIRO_SVG_VERSION_1_2)
Class Method Summary collapse
Class Method Details
.list ⇒ Object
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'ext/cairo/rb_cairo_constants.c', line 225
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 ⇒ Object
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'ext/cairo/rb_cairo_constants.c', line 244
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);
}
}
|
.names ⇒ Object
92 93 94 |
# File 'lib/cairo.rb', line 92 def names list.collect {|version| name(version)} end |