// Compiled by ClojureScript 1.10.520 {}
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__40293 = cell_count;
var x_cells = cljs.core.nth.call(null,vec__40293,(0),null);
var y_cells = cljs.core.nth.call(null,vec__40293,(1),null);
var vec__40296 = dimensions;
var w = cljs.core.nth.call(null,vec__40296,(0),null);
var h = cljs.core.nth.call(null,vec__40296,(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);
});
