Sha256: 1f2a9f80d61584af36e03536ca1c44f1db7d00702f25f4bfd70f597ca2f8dd17
Contents?: true
Size: 663 Bytes
Versions: 30
Compression:
Stored size: 663 Bytes
Contents
#include <cairo_callbacks.h> cairo_status_t cairoSvgSurfaceCallback (void *closure, const unsigned char *data, unsigned int length) { VALUE self = (VALUE) closure; if (rb_iv_get(self, "@svg") == Qnil) { rb_iv_set(self, "@svg", rb_str_new2("")); } rb_str_cat(rb_iv_get(self, "@svg"), data, length); return CAIRO_STATUS_SUCCESS; } cairo_status_t cairoPngSurfaceCallback (void *closure, const unsigned char *data, unsigned int length) { VALUE self = (VALUE) closure; if (rb_iv_get(self, "@png") == Qnil) { rb_iv_set(self, "@png", rb_str_new2("")); } rb_str_cat(rb_iv_get(self, "@png"), data, length); return CAIRO_STATUS_SUCCESS; }
Version data entries
30 entries across 30 versions & 1 rubygems