MCPcopy Create free account
hub / github.com/microsoft/SandDance / cssToDeviceRatio

Function cssToDeviceRatio

docs/app/js/sanddance-app.js:59406–59412  ·  view source on GitHub ↗
(gl)

Source from the content-addressed store, hash-verified

59404parcelHelpers.export(exports, "cssToDevicePixels", ()=>cssToDevicePixels);
59405parcelHelpers.export(exports, "getDevicePixelRatio", ()=>getDevicePixelRatio);
59406function cssToDeviceRatio(gl) {
59407 if (gl.canvas && gl.luma) {
59408 var clientWidth = gl.luma.canvasSizeInfo.clientWidth;
59409 return clientWidth ? gl.drawingBufferWidth / clientWidth : 1;
59410 }
59411 return 1;
59412}
59413function cssToDevicePixels(gl, cssPixel) {
59414 var yInvert = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
59415 var ratio = cssToDeviceRatio(gl);

Callers 1

cssToDevicePixelsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected