static VALUE rb_rsvg_handle_render_cairo(int argc, VALUE *argv, VALUE self) { VALUE cr, id; rb_scan_args(argc, argv, "11", &cr, &id); if (NIL_P(id)) { rsvg_handle_render_cairo( _SELF(self), RVAL2CRCONTEXT(cr)); } else { rsvg_handle_render_cairo_sub( _SELF(self), RVAL2CRCONTEXT(cr), (const char *)RVAL2CSTR(id)); } return Qnil; }
static VALUE method_paint_with_alpha(VALUE self, VALUE _alpha) { double alpha = NUM2DBL(_alpha); cairo_t *cr = RVAL2CRCONTEXT(self); cairo_paint_with_alpha(cr, alpha); return Qnil; }
static VALUE rg_show_pango_error_underline(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height) { pango_cairo_show_error_underline(RVAL2CRCONTEXT(self), NUM2DBL(x), NUM2DBL(y), NUM2DBL(width), NUM2DBL(height)); return self; }
/* Rendering to a path */ static VALUE rg_pango_glyph_string_path(VALUE self, VALUE font, VALUE glyphs) { pango_cairo_glyph_string_path(RVAL2CRCONTEXT(self), RVAL2PANGOFONT(font), RVAL2PANGOGLYPHSTRING(glyphs)); return self; }
static VALUE rg_set_cairo_context(VALUE self, VALUE cr, VALUE dpi_x, VALUE dpi_y) { gtk_print_context_set_cairo_context(_SELF(self), RVAL2CRCONTEXT(cr), NUM2DBL(dpi_x), NUM2DBL(dpi_y)); return self; }
static VALUE rg_render(VALUE self, VALUE cr, VALUE rb_bounds, VALUE scale) { GooCanvasBounds bounds; goo_canvas_render(SELF(self), RVAL2CRCONTEXT(cr), RVAL2GCBOUNDS(rb_bounds, &bounds), NUM2DBL(scale)); return self; }
static VALUE page_render_selection(VALUE self, VALUE cairo, VALUE selection, VALUE rb_old_selection, VALUE style, VALUE glyph_color, VALUE background_color) { PopplerRectangle *old_selection = NULL; if (!NIL_P(rb_old_selection)) old_selection = RVAL2POPPLERRECTANGLE(rb_old_selection); poppler_page_render_selection(SELF(self), RVAL2CRCONTEXT(cairo), RVAL2POPPLERRECTANGLE(selection), old_selection, RVAL2POPPLERSELECTIONSTYLE(style), RVAL2POPPLERCOLOR(glyph_color), RVAL2POPPLERCOLOR(background_color)); return Qnil; }
static VALUE rg_pango_layout_line_path(VALUE self, VALUE line) { pango_cairo_layout_line_path(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUTLINE(line)); return self; }
static VALUE rg_show_pango_layout(VALUE self, VALUE layout) { pango_cairo_show_layout(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUT(layout)); return self; }
/* Convenience */ static VALUE rg_create_pango_layout(VALUE self) { return GOBJ2RVAL_UNREF(pango_cairo_create_layout(RVAL2CRCONTEXT(self))); }
static VALUE rg_update_pango_context(VALUE self, VALUE context) { pango_cairo_update_context(RVAL2CRCONTEXT(self), RVAL2PANGOCONTEXT(context)); return self; }
static VALUE page_render_for_printing(VALUE self, VALUE cairo) { poppler_page_render_for_printing(SELF(self), RVAL2CRCONTEXT(cairo)); return Qnil; }