docs: function Rsvg(buffer) {
  	var self = this;
  
  	// Create proper options for the writable stream super constructor.
  	var options;
  	if (Buffer.isBuffer(buffer)) {
  		options = {};
  	} else if (typeof(buffer) === 'string') {
  		buffer = new Buffer(buffer);
  		options = {};
  	} else if (buffer === undefined || buffer === null) {
  		options = {};
  	} else if (typeof(buffer) === 'object') {
  		options = buffer;
  		buffer = null;
  	} else {
  		throw new TypeError('Invalid argument: buffer');
  	}
  
  	// Inheritance pattern: Invoke super constructor.
  	Writable.call(self, options);
  
  	// Create new instance of binding.
  	try {
  		self.handle = new binding.Rsvg(buffer);
  	} catch (error) {
  		throw new Error('Rsvg load failure: ' + error.message);
  	}
  
  	if (buffer) {
  		process.nextTick(function() {
  			self.emit('load');
  		});
  	}
  
  	// When finished piping into this object, we need to tell the binding that by
  	// invoking the `close()` method.
  	self.on('finish', function() {
  		try {
  			self.handle.close();
  		} catch (error) {
  			if (error.message !== self.lastErrorMessage) {
  				self.lastErrorMessage = error.message;
  				self.emit('error', new Error('Rsvg close failure: ' + error.message));
  			}
  			return;
  		}
  
  		self.emit('load');
  	});
  }