Class: Cairo::SVGSurface

Inherits:
Surface show all
Defined in:
lib/cairo.rb,
ext/cairo/rb_cairo_surface.c

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Surface

#clone, #content, #copy_page, create, #create_similar, #create_similar_image, #destroy, #device, #device_offset, #device_scale, #dup, #fallback_resolution, #finish, #flush, #font_options, #get_mime_data, gl_supported?, gl_texture_supported?, image_supported?, #map_to_image, #mark_dirty, pdf_supported?, ps_supported?, quartz_image_supported?, quartz_supported?, recording_supported?, #reference_count, script_supported?, #set_device_offset, #set_device_scale, #set_fallback_resolution, #set_mime_data, #show_page, #sub_rectangle_surface, supported?, #supported_mime_type?, svg_supported?, tee_supported?, #unmap_image, win32_printing_supported?, win32_supported?, #write_to_png, xml_supported?

Constructor Details

#initializeObject

Class Method Details

.version_to_string(version) ⇒ Object



116
117
118
# File 'lib/cairo.rb', line 116

def version_to_string(version)
  SVGVersion.name(version)
end

.versionsObject



112
113
114
# File 'lib/cairo.rb', line 112

def versions
  SVGVersion.list
end

.versions_as_stringObject



108
109
110
# File 'lib/cairo.rb', line 108

def versions_as_string
  SVGVersion.names
end

Instance Method Details

#document_unitObject



1547
1548
1549
1550
1551
1552
1553
1554
# File 'ext/cairo/rb_cairo_surface.c', line 1547

static VALUE
cr_svg_surface_get_document_unit (VALUE self)
{
  cairo_svg_unit_t unit;
  unit = cairo_svg_surface_get_document_unit (_SELF);
  rb_cairo_surface_check_status (_SELF);
  return INT2NUM (unit);
}

#restrict_to_versionObject

#set_document_unitObject



1556
1557
1558
1559
1560
1561
1562
1563
1564
# File 'ext/cairo/rb_cairo_surface.c', line 1556

static VALUE
cr_svg_surface_set_document_unit (VALUE self, VALUE rb_unit)
{
  cairo_svg_unit_t unit;
  unit = RVAL2CRSVGUNIT (rb_unit);
  cairo_svg_surface_set_document_unit (_SELF, unit);
  rb_cairo_surface_check_status (_SELF);
  return Qnil;
}