<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Softcore software development &#187; svg</title>
	<atom:link href="http://tea.cesaroliveira.net/archives/tag/svg/feed" rel="self" type="application/rss+xml" />
	<link>http://tea.cesaroliveira.net</link>
	<description>It&#039;s all about the cycles</description>
	<lastBuildDate>Sun, 01 Aug 2010 02:04:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SVG experiments</title>
		<link>http://tea.cesaroliveira.net/archives/6</link>
		<comments>http://tea.cesaroliveira.net/archives/6#comments</comments>
		<pubDate>Mon, 28 Apr 2008 02:27:24 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[seneca]]></category>
		<category><![CDATA[svg]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=6</guid>
		<description><![CDATA[While someone else has javascript and canvas covered, I wanted to learn some new things about SVG. While perhaps best known for the tiger and other graphic goodness, I am not a graphics artist. So these didn&#8217;t apply to me so much. However, you can do some neat things with images in SVG that are [...]]]></description>
			<content:encoded><![CDATA[<p>While <a href="http://blog.nihilogic.dk/" onclick="pageTracker._trackPageview('/outgoing/blog.nihilogic.dk/?referer=');">someone else</a> has javascript and canvas covered, I wanted to learn some new things about SVG. While perhaps best known for the <a href="http://www.croczilla.com/svg/samples/tiger/tiger.svg" onclick="pageTracker._trackPageview('/outgoing/www.croczilla.com/svg/samples/tiger/tiger.svg?referer=');">tiger</a> and other <a href="http://www.croczilla.com/svg/samples/" onclick="pageTracker._trackPageview('/outgoing/www.croczilla.com/svg/samples/?referer=');">graphic goodness</a>, I am not a graphics artist. So these didn&#8217;t apply to me so much. However, you can do some neat things with images in SVG that are harder/impossible to do in CSS, such as rotating images and skewing them.</p>
<p>So I started doing some things with SVG. One of those being something to catalog all the albums I have started amassing (I only have 460MB left of my 2GB iPod). Yes, I still do pay for music. I&#8217;m old skool like that.<br />
<object data="/samples/album/album.svg" type="image/svg+xml" width="450px" height="450px"> <em>You need an SVG viewer to view this image. May I recommend a <a href="http://www.adobe.com/svg/viewer/install/" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/svg/viewer/install/?referer=');">plugin</a> or a <a href="http://www.spreadfirefox.com/" onclick="pageTracker._trackPageview('/outgoing/www.spreadfirefox.com/?referer=');">SVG enabled browser</a>?</em></object><br />
Not much. But it took me so long to get rotation working, mainly because of lack of good sample documentation. Though I came across some good <a href="http://apike.ca/prog_svg_transform.html" onclick="pageTracker._trackPageview('/outgoing/apike.ca/prog_svg_transform.html?referer=');">docs</a>, it just wasn&#8217;t enough. For example, here is the code to rorate:<br />
<code><br />
rotate(angle, cx, cy)<br />
</code><br />
Where angle is how much you want to rotate it by, in degrees.<br />
cx and cy are the &#8220;offset of the current view box. If cx and cy are not present then the points are rotated around the origin&#8221; (Bystedt). Both cx and cy are optional.</p>
<p>Maybe an example of rotation would clarify cx and cy. Here is the first image being rotated 45° without skewing at point 0,0.<br />
<object data="/samples/album/fail.svg" type="image/svg+xml" width="450px" height="450px"><em>Man, another SVG image. Your really missing out</em></object><br />
To rotate an image at the centre, cx and cy should be the distance to the centre of the image. Both on the x-axis and y-axis respectively. Imagine to my horror when the image was 50% from the left, and a 45° rotate threw it down half way across the screen. I won&#8217;t bore you with the details of how changing cx and cy confused me even more, but some samples would have helped!</p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
