// Compiled by ClojureScript 1.9.562 {}
goog.provide('weathergen.canvas');
goog.require('cljs.core');
/**
 * Create a new context object that knwos about things like grid
 *   coordinates
 */
weathergen.canvas.create_context = (function weathergen$canvas$create_context(canvas,cell_count,dimensions){
var vec__43725 = cell_count;
var x_cells = cljs.core.nth.call(null,vec__43725,(0),null);
var y_cells = cljs.core.nth.call(null,vec__43725,(1),null);
var vec__43728 = dimensions;
var w = cljs.core.nth.call(null,vec__43728,(0),null);
var h = cljs.core.nth.call(null,vec__43728,(1),null);
var cell_width = (w / x_cells);
var cell_height = (h / y_cells);
var ctx = canvas.getContext("2d");
ctx.setTransform((1),(0),(0),(1),(0),(0));

return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"context","context",-830191113),ctx,new cljs.core.Keyword(null,"cell-width","cell-width",1767835816),cell_width,new cljs.core.Keyword(null,"cell-height","cell-height",776757236),cell_height], null);
});
