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



85
86
87
# File 'lib/cairo.rb', line 85

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

.versionsObject



81
82
83
# File 'lib/cairo.rb', line 81

def versions
  SVGVersion.list
end

.versions_as_stringObject



77
78
79
# File 'lib/cairo.rb', line 77

def versions_as_string
  SVGVersion.names
end

Instance Method Details

#document_unitObject



1588
1589
1590
1591
1592
1593
1594
1595
# File 'ext/cairo/rb_cairo_surface.c', line 1588

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



1597
1598
1599
1600
1601
1602
1603
1604
1605
# File 'ext/cairo/rb_cairo_surface.c', line 1597

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;
}