Safari桌面和移动设备:画布覆盖的图像非常模糊

时间:2017-09-18 13:00:13

标签: ios css html5 css3 canvas

我有一个画布覆盖的图像。图像和画布都包含在缩放的div中。在画布上绘图时,图像变得非常模糊。你有任何想法如何摆脱模糊? 请看这个小提琴:

<body>

    <div style="position: relative;  transform: scaleX(2) scaleY(2) ">

        <div class="pagecontainer" style=" width: 125px; height: 100px; position: absolute; top:0px; left:400px">
            <img src="http://www.maxrev.de/files/2011/02/testbild_1297949508.jpg" width="125" height="100" >
        </div>

        <div style="position: absolute; left: 400px; top:0px;width: 125px; height:150px;">
            <canvas id="supercanvas" width="125" height="150" style="width:125px; height:125px"></canvas>
        </div>
    </div>

    <script>
     document.getElementById("supercanvas").getContext("2d").fillRect(80, 80, 80, 80);
    </script>
</body>

iOS Test - drawing on canvas

iOS Test - not drawing on canvas

0 个答案:

没有答案