<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I think you can use the method: <div>void drawImage(in HTMLCanvasElement image, in float dx, in float dy, in optional float dw, in float dh);</div><div><br></div><div>using this method you can draw one canvas to another one with scale.</div><div><br></div><div><br><hr id="stopSpelling">Date: Mon, 8 Mar 2010 15:02:32 -0500<br>From: shaunwithanau@gmail.com<br>To: help@lists.whatwg.org<br>Subject: [html5] Exporting a large Canvas to SVG<br><br>Currently I am drawing a very large picture to the canvas (think an entire building measured in inches) which is composed of numerous lines (approx 20000). Obviously this picture is having to be scaled down considerably to fit on a canvas. However the user has the option to zoom in on this picture. What this in turn does is set a scaling factor to the canvas causing parts of the drawing to be outside of the canvas's dimensions. <div>
<br></div><div>What I want to do is use SVG (which can be much larger but cannot be used to draw the picture as it consists of too many lines) to replicate what is being drawn to the canvas (including the parts that spill over). This is because I can place the large SVG inside of a limited sized <div> and the user will be able to use the scroll bars to see the entire building. </div>
<div><br></div><div>The idea is that I let canvas handle the data and scaling. Then once I have it the size that I want, then display it in SVG.</div><div><br></div><div>My question is will this work with <span class="ecxApple-style-span" style="font-family:'Courier New', Courier, monospace;font-size:13px;color:rgb(0, 102, 0);line-height:17px;white-space:nowrap">toDataURL<span class="ecxApple-style-span" style="color:rgb(0, 0, 0);font-family:arial;line-height:normal;white-space:normal;font-size:small">? I am guessing that it wont, as it will just send what is actually visible on the canvas to the SVG. </span></span></div>
<div><span class="ecxApple-style-span" style="font-family:'Courier New', Courier, monospace;font-size:13px;color:rgb(0, 102, 0);line-height:17px;white-space:nowrap"><span class="ecxApple-style-span" style="color:rgb(0, 0, 0);font-family:arial;line-height:normal;white-space:normal;font-size:small"><br>
</span></span></div><div>Is there any other way to do this or something similar?</div><div><br></div><div><br></div><div><br></div><div><br></div></div> <br /><hr />使用Messenger保护盾2.0,支持多账号登录! <a href='http://www.windowslive.cn/safe/' target='_new'>现在就下载!</a></body>
</html>