Module: Cairo::PDFVersion

Defined in:
ext/cairo/rb_cairo_constants.c

Constant Summary collapse

VERSION_1_4 =
INT2FIX (CAIRO_PDF_VERSION_1_4)
VERSION_1_5 =
INT2FIX (CAIRO_PDF_VERSION_1_5)

Class Method Summary collapse

Class Method Details

.listObject



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'ext/cairo/rb_cairo_constants.c', line 292

static VALUE
cr_pdf_get_versions (VALUE self)
{
  VALUE rb_versions;
  const cairo_pdf_version_t *versions;
  int i, n_versions;

  cairo_pdf_get_versions (&versions, &n_versions);

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

  return rb_versions;
}

.nameObject



310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'ext/cairo/rb_cairo_constants.c', line 310

static VALUE
cr_pdf_version_to_string (int argc, VALUE *argv, VALUE self)
{
  if (argc == 0)
    {
      return rb_call_super (argc, argv);
    }
  else
    {
      VALUE version;
      rb_scan_args (argc, argv, "1", &version);
      return rb_str_new2 (cairo_pdf_version_to_string (RVAL2CRPDFVERSION (version)));
    }
}