1

私は IE6/7 がキャンバスをネイティブにサポートしていないことを知っているので、IE ブラウザ用に excanvas.js を使用しています。キャンバス タグに 2 つの画像を描画するスクリプトがあります。例えば。

var canvas = $('.map_container')[0];
        var context = canvas.getContext("2d");

context.drawImage(images.national,getPositionOrScale(0),getPositionOrScale(0),getPositionOrScale(images.national.width),getPositionOrScale(images.national.height));

今、私は2つの異なる画像でcontext.drawImageを呼び出し、両方の画像が描画されますが、IE6/7を使用していて、印刷プレビューまたは印刷に行きます。描画された最後の画像のみを印刷します。

キャンバス全体をそのまま印刷できない理由はありますか?

4

1 に答える 1

1

I figured out that they get layered on top of each other. I'm sure this is ancient history for you, but if you put one of the two in a div with a height set to the size of the canvas, you should be able to see both.

于 2012-01-27T17:40:44.607 に答える