mirror of
https://github.com/Modernizr/Modernizr.git
synced 2026-01-10 08:08:08 -05:00
Thx for your work.
This commit is contained in:
@@ -12,10 +12,16 @@ define(['Modernizr', 'createElement', 'test/canvastext'], function(Modernizr, cr
|
||||
if (!Modernizr.canvastext) {
|
||||
return false;
|
||||
}
|
||||
var pixelRatio = window.devicePixelRatio || 1;
|
||||
var offset = 12 * pixelRatio;
|
||||
var node = createElement('canvas');
|
||||
var ctx = node.getContext('2d');
|
||||
var backingStoreRatio =
|
||||
ctx.webkitBackingStorePixelRatio ||
|
||||
ctx.mozBackingStorePixelRatio ||
|
||||
ctx.msBackingStorePixelRatio ||
|
||||
ctx.oBackingStorePixelRatio ||
|
||||
ctx.backingStorePixelRatio ||
|
||||
1;
|
||||
var offset = 12 * backingStoreRatio;
|
||||
ctx.fillStyle = '#f00';
|
||||
ctx.textBaseline = 'top';
|
||||
ctx.font = '32px Arial';
|
||||
|
||||
Reference in New Issue
Block a user