dist/jcanvas.js
function _setGlobalProps(canvas, ctx, params) {
	_setStyle(canvas, ctx, params, 'fillStyle');
	_setStyle(canvas, ctx, params, 'strokeStyle');
	ctx.lineWidth = params.strokeWidth;
	// Optionally round corners for paths
	if (params.rounded) {
		ctx.lineCap = ctx.lineJoin = 'round';
	} else {
		ctx.lineCap = params.strokeCap;
		ctx.lineJoin = params.strokeJoin;
		ctx.miterLimit = params.miterLimit;
	}
	// Reset strokeDash if null
	if (!params.strokeDash) {
		params.strokeDash = [];
	}
	// Dashed lines
	if (ctx.setLineDash) {
		ctx.setLineDash(params.strokeDash);
	}
	ctx.webkitLineDash = params.strokeDash;
	ctx.lineDashOffset = ctx.webkitLineDashOffset = ctx.mozDashOffset = params.strokeDashOffset;
	// Drop shadow
	ctx.shadowOffsetX = params.shadowX;
	ctx.shadowOffsetY = params.shadowY;
	ctx.shadowBlur = params.shadowBlur;
	ctx.shadowColor = params.shadowColor;
	// Opacity and composite operation
	ctx.globalAlpha = params.opacity;
	ctx.globalCompositeOperation = params.compositing;
	// Support cross-browser toggling of image smoothing
	if (params.imageSmoothing) {
		ctx.imageSmoothingEnabled = params.imageSmoothing;
	}
}
function _setGlobalProps(canvas, ctx, params) {
	_setStyle(canvas, ctx, params, 'fillStyle');
	_setStyle(canvas, ctx, params, 'strokeStyle');
	ctx.lineWidth = params.strokeWidth;
	// Optionally round corners for paths
	if (params.rounded) {
		ctx.lineCap = ctx.lineJoin = 'round';
	} else {
		ctx.lineCap = params.strokeCap;
		ctx.lineJoin = params.strokeJoin;
		ctx.miterLimit = params.miterLimit;
	}
	// Reset strokeDash if null
	if (!params.strokeDash) {
		params.strokeDash = [];
	}
	// Dashed lines
	if (ctx.setLineDash) {
		ctx.setLineDash(params.strokeDash);
	}
	ctx.webkitLineDash = params.strokeDash;
	ctx.lineDashOffset = ctx.webkitLineDashOffset = ctx.mozDashOffset = params.strokeDashOffset;
	// Drop shadow
	ctx.shadowOffsetX = params.shadowX;
	ctx.shadowOffsetY = params.shadowY;
	ctx.shadowBlur = params.shadowBlur;
	ctx.shadowColor = params.shadowColor;
	// Opacity and composite operation
	ctx.globalAlpha = params.opacity;
	ctx.globalCompositeOperation = params.compositing;
	// Support cross-browser toggling of image smoothing
	if (params.imageSmoothing) {
		ctx.imageSmoothingEnabled = params.imageSmoothing;
	}
}
function _setGlobalProps ( canvas , ctx , params ) { _setStyle ( canvas , ctx , params , 'fillStyle' ) ; _setStyle ( canvas , ctx , params , 'strokeStyle' ) ; ctx . lineWidth = params . strokeWidth ; // Optionally round corners for paths if ( params . rounded ) { ctx . lineCap = ctx . lineJoin = 'round' ; } else { ctx . lineCap = params . strokeCap ; ctx . lineJoin = params . strokeJoin ; ctx . miterLimit = params . miterLimit ; } // Reset strokeDash if null if ( ! params . strokeDash ) { params . strokeDash = [ ] ; } // Dashed lines if ( ctx . setLineDash ) { ctx . setLineDash ( params . strokeDash ) ; } ctx . webkitLineDash = params . strokeDash ; ctx . lineDashOffset = ctx . webkitLineDashOffset = ctx . mozDashOffset = params . strokeDashOffset ; // Drop shadow ctx . shadowOffsetX = params . shadowX ; ctx . shadowOffsetY = params . shadowY ; ctx . shadowBlur = params . shadowBlur ; ctx . shadowColor = params . shadowColor ; // Opacity and composite operation ctx . globalAlpha = params . opacity ; ctx . globalCompositeOperation = params . compositing ; // Support cross-browser toggling of image smoothing if ( params . imageSmoothing ) { ctx . imageSmoothingEnabled = params . imageSmoothing ; } }
Set canvas context properties
Set canvas context properties