INNER CODE UNIT · JavaScript

scale

Booodaness/Scientific-Notes · Booodaness/_Assets/Presentations/phase-space-analysis-harmonic-oscillators.md/plugin/chalkboard/plugin (copy).js:619

			scale = Math.min( width/storage[1].width, height/storage[1].height);
			xOffset = (width - storage[1].width * scale)/2;
			yOffset = (height - storage[1].height * scale)/2;
		}
		mode = 1;
		board = 0;
console.log( 'Create printout(s) for slide ', slideData);

		var drawings = [];
		var template = document.createElement('canvas');
		template.width = width;
		template.height = height;

		var imgCtx = template.getContext("2d");
		imgCtx.fillStyle = imgCtx.createPattern( patImg ,'repeat');
		imgCtx.rect(0,0,width,height);
		imgCtx.fill();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…