// Class: lime.graphics.Renderer

var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this

$global.Object.defineProperty(exports, "__esModule", {value: true});

var __map_reserved = {};

// Imports

var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
function lime_app__$Event_$Void_$Void() {return require("./../../lime/app/_Event_Void_Void");}
function lime_app__$Event_$lime_$graphics_$RenderContext_$Void() {return require("./../../lime/app/_Event_lime_graphics_RenderContext_Void");}
function lime__$backend_html5_HTML5Renderer() {return require("./../../lime/_backend/html5/HTML5Renderer");}

// Constructor

var Renderer = function(window) {
	this.onRender = new (lime_app__$Event_$Void_$Void().default)();
	this.onContextRestored = new (lime_app__$Event_$lime_$graphics_$RenderContext_$Void().default)();
	this.onContextLost = new (lime_app__$Event_$Void_$Void().default)();
	this.window = window;
	this.backend = new (lime__$backend_html5_HTML5Renderer().default)(this);
	this.window.renderer = this;
}

// Meta

Renderer.__name__ = ["lime","graphics","Renderer"];
Renderer.prototype = {
	create: function() {
		this.backend.create();
	},
	flip: function() {
		this.backend.flip();
	},
	readPixels: function(rect) {
		return this.backend.readPixels(rect);
	},
	render: function() {
		this.backend.render();
	}
};
Renderer.prototype.__class__ = Renderer.prototype.constructor = $hxClasses["lime.graphics.Renderer"] = Renderer;

// Init



// Statics




// Export

exports.default = Renderer;