<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: July release</title>
	<atom:link href="http://www.vectomatic.org/lib-gwt-svg/july-release/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vectomatic.org/lib-gwt-svg/july-release</link>
	<description>standard dynamic 2D graphics in web browsers</description>
	<lastBuildDate>Fri, 02 Dec 2011 17:17:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Bret</title>
		<link>http://www.vectomatic.org/lib-gwt-svg/july-release/comment-page-1#comment-370</link>
		<dc:creator>Bret</dc:creator>
		<pubDate>Fri, 23 Jul 2010 11:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/vectomatic/?p=480#comment-370</guid>
		<description>Lukas, this is a great library.  I have one question about your lib-gwt-svg example &quot;Events&quot; page.  This is the example with the circle and and the square that can be moved with the mouse.  If I add the following line after the square is created. 

      // rotate the square 45 degrees
      square.setAttribute(&quot;transform&quot;, &quot;rotate(45,40,40)&quot;);


How can I correctly handle the transform for setting the x and y to track the mouse?
    public void onMouseMove(MouseMoveEvent event) {
        if (dragging) {
            OMSVGPoint d = getLocalCoordinates(event).substract(p);
            square.getX().getBaseVal().setValue(x0 + d.getX());
            square.getY().getBaseVal().setValue(y0 + d.getY());
        }
        event.stopPropagation();
        event.preventDefault();
    }</description>
		<content:encoded><![CDATA[<p>Lukas, this is a great library.  I have one question about your lib-gwt-svg example &#8220;Events&#8221; page.  This is the example with the circle and and the square that can be moved with the mouse.  If I add the following line after the square is created. </p>
<p>      // rotate the square 45 degrees<br />
      square.setAttribute(&#8220;transform&#8221;, &#8220;rotate(45,40,40)&#8221;);</p>
<p>How can I correctly handle the transform for setting the x and y to track the mouse?<br />
    public void onMouseMove(MouseMoveEvent event) {<br />
        if (dragging) {<br />
            OMSVGPoint d = getLocalCoordinates(event).substract(p);<br />
            square.getX().getBaseVal().setValue(x0 + d.getX());<br />
            square.getY().getBaseVal().setValue(y0 + d.getY());<br />
        }<br />
        event.stopPropagation();<br />
        event.preventDefault();<br />
    }</p>
]]></content:encoded>
	</item>
</channel>
</rss>

