<?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"
	>

<channel>
	<title>From Accessibility to Zope</title>
	<atom:link href="http://blog.mauveweb.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mauveweb.co.uk</link>
	<description>experiments in contemporary web development</description>
	<pubDate>Wed, 03 Sep 2008 14:30:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Google Chrome</title>
		<link>http://blog.mauveweb.co.uk/2008/09/03/google-chrome/</link>
		<comments>http://blog.mauveweb.co.uk/2008/09/03/google-chrome/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 14:22:22 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Browsers]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=161</guid>
		<description><![CDATA[Over the past few months the web browser industry has shifted up a gear. After years of stagnation and limited diversity the market is blossoming, first with Safari opening up to the mass-market of Windows, then Opera 9.5, then Firefox 3 and now Google Chrome. And soon, Internet Explorer 8, which is verging on counting [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few months the web browser industry has shifted up a gear. After years of stagnation and limited diversity the market is blossoming, first with Safari opening up to the mass-market of Windows, then Opera 9.5, then Firefox 3 and now Google Chrome. And soon, Internet Explorer 8, which is verging on counting as a real browser (so tacit congratulations for Microsoft are probably in order).</p>
<p>If you look at the <a href="http://www.google.com/chrome/intl/en-GB/features.html">features promised by Google Chrome</a> there&#8217;s precedent for all of them:</p>
<ul>
<li>One Box for everything - Opera 9.5 / Firefox 3</li>
<li id="newtab" class="selected">New Tab page - Opera 9.5</li>
<li id="apps">Application shortcuts - Mozilla Prism</li>
<li id="tabs">Dynamic tabs - Opera 9.5</li>
<li id="crash">Crash control - Internet Explorer 8</li>
<li id="incognito">Incognito mode - <a href="https://addons.mozilla.org/en-US/firefox/addon/1306">Stealther Firefox extension,</a> InPrivate mode in IE8</li>
<li id="safe">Safe browsing - Firefox 2, IE7&#8230;</li>
<li id="bookmarks">Instant bookmarks - Firefox 3</li>
<li id="downloads">Simpler downloads - Ok, I don&#8217;t know of a suitable precedent for this.</li>
</ul>
<p>But that&#8217;s not really the point. What Google have done is cherry-picked the features to adopt in order to paint a clear picture of the way they see the web developing (and they are probably right, not least because they are pouring money into making it develop that way).</p>
<p>I wrote a webrunner (to borrow terminology from Mozilla) way back in 2001 or thereabouts, embedding the Internet Explorer component CHTMLView in a chromeless frame. The merit of the site-focused approach was obvious then even though my implementation was mainly just an exercise in MFC, and it was merely for a forum I used to frequent. The point is that not all webpages are equal. People don&#8217;t spend most of their web time &#8220;browsing&#8221;: 90% of the time they are just logged into the same sites and applications. Chrome&#8217;s user interface, architecture, and selection of features seem better prepared for this than any other browser on the market.</p>
<p>Google Chrome is a leap towards a much more minimal browser that knows you aren&#8217;t running it so that you can use a browser, you&#8217;re running it so that you can use websites. This web-centric future has been predicted so often, it comes as a shock to see that this is what it feels like, and that other web browser manufacturers have never taken the initiative to fully deliver on this promise.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/09/03/google-chrome/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SVG Goo</title>
		<link>http://blog.mauveweb.co.uk/2008/08/31/svg-goo/</link>
		<comments>http://blog.mauveweb.co.uk/2008/08/31/svg-goo/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 15:20:04 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Artwork]]></category>

		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=155</guid>
		<description><![CDATA[It&#8217;s a well known computer graphics technique that blobby shapes can be drawn as the isosurface of a scalar field.
It&#8217;s actually possible to create a similar effect using SVG filters:

The field is created using Gaussian-blurred circles. Where these soft edges overlap, the alpha channels are composited and this creates the necking effect which is key [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a well known computer graphics technique that blobby shapes can be drawn as the isosurface of a scalar field.</p>
<p>It&#8217;s actually possible to create a similar effect using SVG filters:</p>
<p><img class="size-full wp-image-159" title="goo" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/08/goo.png" alt="Blobby, ketchuppy shapes" width="500" height="495" /></p>
<p>The field is created using Gaussian-blurred circles. Where these soft edges overlap, the alpha channels are composited and this creates the necking effect which is key to blobby shapes like this.</p>
<p>The thresholding is done using a high-contrast filter on the alpha channel. The specular highlight was added just to emphasise the gooey, ketchup-y effect.</p>
<p>If you have a copy of Inkscape, it&#8217;s fun to play with dragging the circles. Feel free to <a href="http://blog.mauveweb.co.uk/wp-content/uploads/2008/08/goo.svg">download the SVG</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/08/31/svg-goo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Seam Carving</title>
		<link>http://blog.mauveweb.co.uk/2008/08/30/seam-carving/</link>
		<comments>http://blog.mauveweb.co.uk/2008/08/30/seam-carving/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 12:07:47 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=157</guid>
		<description><![CDATA[I&#8217;ve just come across this awesome technique:

One of the reasons designers like to use fixed rather than fluid website layouts is because of the difficulty in providing attractive images at unknown aspect ratios. This technique offers a really beautiful solution.
The presentation shows that all that is needed to apply the effect is an image plane [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just come across this awesome technique:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="src" value="http://www.youtube.com/v/vIFCV2spKtg&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x402061&amp;color2=0x9461ca" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/vIFCV2spKtg&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x402061&amp;color2=0x9461ca" allowfullscreen="true"></embed></object></p>
<p>One of the reasons designers like to use fixed rather than fluid website layouts is because of the difficulty in providing attractive images at unknown aspect ratios. This technique offers a really beautiful solution.</p>
<p>The presentation shows that all that is needed to <em>apply</em> the effect is an image plane containing the priority of each pixel or effectively in which seam removal it is to be eliminated.</p>
<p>I demand that:</p>
<ol>
<li>There be a PNG extension chunk defined to encode this plane.</li>
<li>Web browsers support this new chunk when non-proportionally scaling images.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/08/30/seam-carving/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Model Downcast in Django</title>
		<link>http://blog.mauveweb.co.uk/2008/07/30/model-downcast-in-django/</link>
		<comments>http://blog.mauveweb.co.uk/2008/07/30/model-downcast-in-django/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 20:29:43 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Django]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=154</guid>
		<description><![CDATA[Django has had multi-table inheritance for three months now, but I haven&#8217;t used it because I can&#8217;t picture many use cases for inheritance which don&#8217;t rely on dynamic polymorphism.
In my current project, however, I&#8217;ve found a fairly convincing use case. I can do all of the basic listing and manipulation with the base class, and [...]]]></description>
			<content:encoded><![CDATA[<p>Django has had multi-table inheritance for three months now, but I haven&#8217;t used it because I can&#8217;t picture many use cases for inheritance which don&#8217;t rely on dynamic polymorphism.</p>
<p>In my current project, however, I&#8217;ve found a fairly convincing use case. I can do all of the basic listing and manipulation with the base class, and I only need the superclass for one particular operation. </p>
<p>Rather than writing this in a different way, which would be less intuitive, I pushed ahead with the conceptually simple approach and fought with Django to make the inheritance polymorphic. The way I did this was brute force it: check all of the relations for one that exists.</p>
<p><code><span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">db</span> <span style="color: #ff7700;font-weight:bold;">import</span> models<br />
cls = inst.__class__ <span style="color: #808080; font-style: italic;">#inst is an instance of the base model</span><br />
<span style="color: #ff7700;font-weight:bold;">for</span> r <span style="color: #ff7700;font-weight:bold;">in</span> cls._meta.<span style="color: black;">get_all_related_objects</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #008000;">issubclass</span><span style="color: black;">&#40;</span>r.<span style="color: black;">model</span>, cls<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">or</span> \<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #008000;">isinstance</span><span style="color: black;">&#40;</span>r.<span style="color: black;">field</span>, models.<span style="color: black;">OneToOneField</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">continue</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">try</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">getattr</span><span style="color: black;">&#40;</span>inst, r.<span style="color: black;">get_accessor_name</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">except</span> models.<span style="color: black;">ObjectDoesNotExist</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">continue</span></code></p>
<p>There are faster ways of doing this if you do it at the database level (left joining all tables in the inheritance hierarchy and sorting out the mess into the correct subclasses), but this is simple and self-contained and forces me to think about when I need this. And looking at the query cache, the overhead is not too bad anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/07/30/model-downcast-in-django/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Social Calendaring</title>
		<link>http://blog.mauveweb.co.uk/2008/07/22/social-calendaring/</link>
		<comments>http://blog.mauveweb.co.uk/2008/07/22/social-calendaring/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 12:46:39 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=153</guid>
		<description><![CDATA[The current generation of social networks are based on an assumption that giving you reams of data about what other people are doing and have done really puts you in touch with other people. As a user, I do get the impression that I am in touch with people, even though I may not actually [...]]]></description>
			<content:encoded><![CDATA[<p>The current generation of social networks are based on an assumption that giving you reams of data about what other people are doing and have done really puts you in touch with other people. As a user, I do get the impression that I am in touch with people, even though I may not actually be communicating with them. So we don&#8217;t always bother to make stuff happens.</p>
<p>There are social networks that tell you where friends have been, some that tell you where they are, some that tell you what they are doing <em>right now</em> and some that tell you where they will be. But very few, it seems, that tell you <strong>where to be</strong>.</p>
<p>Taking Facebook as an example (as it&#8217;s the only social network I&#8217;m using heavily at the moment), it does not make it easy to set up things to do. Creating events is a very laboured process. It takes perhaps 15 minutes to set up an event. It&#8217;s an individual rather than a collaborative task. Invitations to events get ignored because of the way they are delivered. People get blanketed with invitations that they don&#8217;t want. And I can&#8217;t even set up an event until I&#8217;ve set up a group to arrange the event.</p>
<p>Social calendaring is not a new concept as the promise of electronic calendars has always included ease of scheduling, via e-mail invitations of some sort. <a href="http://www.google.com/googlecalendar/">Google Calendar</a> and <a href="http://30boxes.com">30 Boxes</a> represent the state of the art in this regard, which is simply calendar sharing and event invitations.</p>
<p>The thing social calendars really should address is scheduling of events, because I&#8217;m lazy and also busy and I always say things like &#8220;we really should &#8230;&#8221; but it never happens.</p>
<p>My ideal social calendar could fulfil these user stories:</p>
<ul>
<li>Find me something to join in with on any given day.</li>
<li>Schedule things with the knowledge of when I&#8217;m most likely to be free or busy, even when nothing is scheduled.</li>
<li>Arrange online games with my brother in Australia (7 hours ahead in summer or 9 hours in the winter).</li>
<li>Pick a date and time to do a thing I want to do, with friends who want to and who may have to travel to do it.</li>
<li>Remind me to book the venue for an event.</li>
<li>Book out an event I&#8217;m hosting.</li>
<li>Nail down the fuzziness inherent in saying something like &#8220;Let&#8217;s have dinner on Thursday evening&#8221; so that we can say &#8220;Dinner at 8pm, and Alice will be joining us at around 10pm for drinks&#8221;.</li>
<li>Suggest when to actually go to bed so that I can get up next morning.</li>
<li>Pin-point exactly where an event is so that I can work out how to get there.</li>
<li>Don&#8217;t keep trying to schedule things my skint friends can&#8217;t afford to do.</li>
<li>Suggest things I might like to do.</li>
<li>Mildly favour a schedule where I can watch my favourite TV programmes.</li>
<li>Create entirely new groups of local people with similar tastes (say Buffy, or Linux) in such a way as to be actually kind of fun and neither awkward or annoying.</li>
</ul>
<p>As is perhaps evident, I&#8217;m a strong believer in heuristic tools that do really innovative stuff. What are the chances that all of the above are possible in a calendar application that doesn&#8217;t automatically book me to go pole-dancing in Alaska moments before it has me watching Mork and Mindy with total strangers in my home on a Friday night? Hmm.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/07/22/social-calendaring/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WCAG + Samurai</title>
		<link>http://blog.mauveweb.co.uk/2008/07/09/wcag-samurai/</link>
		<comments>http://blog.mauveweb.co.uk/2008/07/09/wcag-samurai/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 11:17:21 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Accessibility]]></category>

		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=152</guid>
		<description><![CDATA[The WCAG Samurai Errata to WCAG 1.0 is an independently-produced set of amendments (&#8221;errata&#8221; is not really the right word) that fairly accurately nail how WCAG is and isn&#8217;t working for pragmatic but standards-compliant developers like me.
I stumbled across this while browsing Google for references while writing a proposal for a client. I was writing [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://wcagsamurai.org/">WCAG Samurai Errata</a> to WCAG 1.0 is an independently-produced set of amendments (&#8221;errata&#8221; is not really the right word) that fairly accurately nail how WCAG is and isn&#8217;t working for pragmatic but standards-compliant developers like me.</p>
<p>I stumbled across this while browsing Google for references while writing a proposal for a client. I was writing my usual set of caveats about the Web Content Accessbility Guidelines (WCAG), in which I lament how rubbish they are in practice. My usual spiel goes along the lines of &#8220;WCAG 1.0 informs all of our work at Mauve Internet. However, because the WCAG is subject to intepretation, and is now somewhat dated, we do not warrant conformance.&#8221; I would like to make a clearer statement of how and why but a specification isn&#8217;t really the place to challenge sections of the WCAG.</p>
<p>Happily, I can now get rid of this kind of non-committal note when writing specifications, and offer a firm commitment to WCAG+Samurai.</p>
<p>I will also be revising my company website - indeed, my company policy - to recommend conformance to the WCAG guidelines as amended by the WCAG Samurai Errata where possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/07/09/wcag-samurai/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tip: Photography for the web</title>
		<link>http://blog.mauveweb.co.uk/2008/07/01/tip-photography-for-the-web/</link>
		<comments>http://blog.mauveweb.co.uk/2008/07/01/tip-photography-for-the-web/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 18:16:49 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=151</guid>
		<description><![CDATA[What with the summer weather finally here and some good light, it&#8217;s a good time to be taking photos.
While I do encourage people to take nice, artistic photographs, and include them on a website perhaps in a frame, this is ultimately limiting. If you would like to end up with photos you can use within [...]]]></description>
			<content:encoded><![CDATA[<p>What with the summer weather finally here and some good light, it&#8217;s a good time to be taking photos.</p>
<p>While I do encourage people to take nice, artistic photographs, and include them on a website perhaps in a frame, this is ultimately limiting. If you would like to end up with photos you can use within the design of a website, you need to take a different approach to setting up your shots. The composition will be done using graphics software at a later date, so you need to avoid doing the composition when you&#8217;re in the field.</p>
<p>The following guidelines are based on the main reasons I have to rule out a particular photograph as suitable for a piece of graphic design.</p>
<p><strong>Don&#8217;t crop the subject</strong></p>
<p>It may look artistic if the subject extends out of the frame, because it places the subject better in frame and leads the eye in the opposite direction. But it&#8217;s the number one reason for ruling out photographs from a layout. With no cropping of the subject, the designer can place a photo anywhere and composite the subject into the layout. With one edge running through the subject, the designer is constrained to place that edge along a natural edge in the layout, or failing that, hide it behind something else. With each additional edge that runs through the subject, the designer is more and more constrained with what can go where.</p>
<p><strong>Don&#8217;t take black and white shots<br />
</strong></p>
<p>It&#8217;s easy to convert colour photos to black and white on a computer; the opposite is not possible. Take colour photos just in case you need them.</p>
<p><strong>Use a mixture of different shots</strong></p>
<p>Most photographers will take multiple shots of a subject, but often this will just be a process of refinement - to try and capture one excellent photograph. You should aim for a much more varied mixture, of portrait and landscape, wide-angle and close-up, different angles and so on.</p>
<p><strong>Try and take the same shot of different subjects</strong></p>
<p>Designers will often be creating a suite of graphics to work together, so take similar shots of different but related subjects.</p>
<p><strong>Include acres of background in your shots</strong></p>
<p>In artistic photography you&#8217;re told to put the subject off-centre in the picture, roughly a third into the frame.</p>
<p>In web design we often have very long or tall regions to fill, quite different dimensions that you might encounter in print design. The aspect ratio of the photos that we might be putting on a website is rarely 16:9 let alone the traditional 4:3. We&#8217;re more likely to deal with aspect ratios of 10:1.</p>
<p>To successfully frame photos that can be cropped to a very wide or tall aspect ratio, your subject should be much smaller and nearer the edge.<strong></strong></p>
<p><strong>Don&#8217;t use depth of field effects<br />
</strong></p>
<p>A short depth of field can really 3D effect to a photograph. But it is difficult to cut out something that&#8217;s blurry, and sometimes that&#8217;s what designers want to do. A blurry background isn&#8217;t a problem, as part or all of the background may be removed, but when parts of the subject extend out of focus it&#8217;s impossible to separate the subject from the background.</p>
<p>A designer can fake a depth of field effect if the subject is in focus.</p>
<p><strong>Don&#8217;t strive for contrast</strong></p>
<p>As a rule of thumb, artistic photos look best with dark darks and bright highlights. Nearly all B2B and the majority of B2C websites are dark text on a pale background, and the dark darks contrast too much with the light and airy environment of the average website. That&#8217;s something that you can&#8217;t actually fix with colour curves as you can only produce murky greys. A subject that is mostly well lit but fades to black is as hard to work with on a pale website as one that is blurry or cropped: there&#8217;s no good way to blend the dark bit into the site.</p>
<p>If your website is on black or dark grey, you&#8217;re in luck. These are ideal for publishing artistic photography and really good contrast will look stunning.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/07/01/tip-photography-for-the-web/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SVG filters with Inkscape 0.46</title>
		<link>http://blog.mauveweb.co.uk/2008/04/19/svg-filters-with-inkscape-046/</link>
		<comments>http://blog.mauveweb.co.uk/2008/04/19/svg-filters-with-inkscape-046/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 11:40:01 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Artwork]]></category>

		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=138</guid>
		<description><![CDATA[One of the most stunningly powerful features of the recently release Inkscape 0.46 is the ability to design SVG filters. SVG filters are a section of the SVG language for connecting simple, well-defined raster operations and applying those to rasterised vector shapes in the document.
What this entails is that it&#8217;s possibly to take very simple [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most stunningly powerful features of the recently release <a href="http://www.inkscape.org/">Inkscape 0.46</a> is the ability to design SVG filters. SVG filters are a section of the SVG language for connecting simple, well-defined raster operations and applying those to rasterised vector shapes in the document.</p>
<p>What this entails is that it&#8217;s possibly to take very simple vector shapes, bung on a filter, and get some very pretty artwork <strong>which can still be edited as paths.</strong></p>
<p>Inkscape&#8217;s 0.45 release saw the implementation of its first filter: Gaussian blur. On its own, Gaussian blur was an incredible useful filter, offering soft edges and powerful shading techniques. But with the collection of other filters provided, it also provides a building block for constructing some very complicated and useful graphical operations that could previously only be done with a raster tool like The Gimp.</p>
<p>Unfortunately, you will need a fairly deep knowledge of 2D image processing to make use of SVG filters. Fortunately I have one of these. Allow me to walk you through creating a filter in Inkscape 0.46.</p>
<p>I want to start with an example of a graphic I created way way back with Inkscape 0.38.</p>
<p><img class="alignnone size-full wp-image-136" title="original" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/original.png" alt="Original Mauveweb logo" width="450" height="113" /></p>
<p>I created this graphic by drawing a blob, adding some text (in a font called &#8220;Balcony Angels&#8221;) and then painstakingly drawing out the highlights (specular lighting) as partially-transparent white paths. It&#8217;s also got a drop shadow.</p>
<p>Let&#8217;s start again in Inkscape 0.46. I&#8217;m using the star tool with a bit of randomness to start me out with a blob. The wording is just normal text but I&#8217;ve tweaked the kerning a little this time. Also notice the gradient. Depending on how you wire up your filters you can preserve the colours and using a bit of gradient will always help to give a word-art logo like this a bit more richness.</p>
<p><img class="alignnone size-full wp-image-140" title="plain" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/plain.png" alt="" width="450" height="133" /></p>
<p>To add lighting, you need a height map. The simplest way to create a height map is by applying a <strong>gaussian blur</strong>. SVG uses the alpha channel to represent the height map. Without a blur you can imagine that the height is 0% outside the shape and 100% inside - like a cliff or a plateau. With a blur you have a partially transparent edge, so it smoothly rises from the 0 to the 100%, like rolling hills. I usually apply the blur to the alpha channel as the colour channels aren&#8217;t relevant.</p>
<p><img class="alignnone size-full wp-image-142" title="blur" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/blur.png" alt="" width="450" height="158" /></p>
<p>You can only see a 3D shape appear when we wire up a lighting filter. <strong>Specular lighting</strong> is what we&#8217;re shooting for. The output of specular lighting is just the highlights so make sure the document background is set to opaque black before you start experimenting.</p>
<p><img class="alignnone size-full wp-image-143" title="specular_on_black" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/specular_on_black.png" alt="" width="450" height="149" /></p>
<p>Specular lighting is very sensitive to some of the settings you&#8217;re using.</p>
<ul>
<li><strong>Surface scale</strong> - here&#8217;s where we say what the 100% height of the height map actually is. Generally you should stick to small positive numbers. Try 10. The gradient of the bumpy edges can be thought of as this number over the blur radius. If you&#8217;ve got 10px of blur, and a surface scale of 10, your bumpy edges should have a 1:1 gradient.</li>
<li><strong>Constant</strong> - this number combines two ideas: how bright the light source is, and how much light the object reflects. 0 means that the light is off, so that&#8217;s not what you want. Numbers between 0 and 1 mean the object reflects a fraction of the light, or the light is dim. Numbers over 1 mean that the light is brighter. It&#8217;s all relative, obviously.</li>
<li><strong>Exponent</strong> - this is the glossiness of the surface. The higher the exponent, the tighter the highlights. Metals have quite low exponents - say 10. 30ish gives a soft plastic. Higher gives the effect of ceramics and polished surfaces.</li>
<li><strong>Light Source</strong> - start with distant light, azimuth 225, elevation 25 and experiment from there. That will give you the kind of lighting from the top-left that mimics the user interface of most computers.</li>
</ul>
<p>The outer halo, if you&#8217;re wondering, is where the light catches off the bottom of the slope. We can clip that away at the same time as we apply it to the shape. To do this, we use an <strong>atop</strong> filter. The top input is the highlights, the bottom is the source graphic. <strong>Atop</strong> draws the highlights only over the source graphic. This is equivalent to (specular <strong>in</strong> source alpha) <strong>over</strong> source grahic.</p>
<p><img class="alignnone size-full wp-image-141" title="specular" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/specular.png" alt="" width="450" height="133" /></p>
<p>We can also add the outline from the original. If we added it before the filtering, it would have also been shaded because the outline would be part of the alpha channel that we bumpmapped. We need a raster outline. We can do this using the <strong>morphology</strong> filter.</p>
<p>We dilate the source alpha channel and <strong>composite</strong> the original over the top. Voila:</p>
<p><img class="alignnone size-full wp-image-145" title="morphology" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/morphology.png" alt="" width="450" height="137" /></p>
<p>And then there&#8217;s a slight drop shadow. <strong>Gaussian blur</strong> the same <strong>morphology</strong> filter, add a couple of pixels of <strong>offset</strong>. Then <strong>composite</strong> the previous stage back on top of it.</p>
<p><img class="alignnone size-full wp-image-146" title="shadow" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/shadow.png" alt="" width="450" height="139" /></p>
<p>If the shadow - or indeed the highlights are too bright, you can make them slightly transparent with a <strong>colour matrix</strong> filter. The fourth row of the colour matrix is the alpha channel, and the fourth column of that row is how much of the alpha channel to pass through. Change it to any number between 0 and 1 to make it partially transparent.</p>
<p>I&#8217;ve got one last trick up my sleeve, and it&#8217;s the most complicated one.</p>
<p>I&#8217;m going to decrease the exponent on the specular filter a little to give me bigger highlights. Then I want to <em>increase the contrast on the alpha channel.</em> This can be done with a <strong>colour matrix</strong> filter. I set the last row to (0, 0, 0, 4.0, -1.5). This means that the alpha channel will be mapped a -&gt; 4a - 1.5. This will to some extent remove the partial shades in the specular highlight and give me a more cartoon effect:</p>
<p><img class="alignnone size-full wp-image-148" title="final" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/final.png" alt="" width="450" height="139" /></p>
<p>This is how the final filter is wired:</p>
<p><a rel="attachment wp-att-149" href="http://blog.mauveweb.co.uk/2008/04/19/svg-filters-with-inkscape-046/filter_wiring/"><img class="alignnone size-medium wp-image-149" title="filter_wiring" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/filter_wiring-300x288.jpg" alt="Screenshort of the wiring for the Mauveweb logo filter" width="300" height="288" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/04/19/svg-filters-with-inkscape-046/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Websites I&#8217;ve worked on</title>
		<link>http://blog.mauveweb.co.uk/2008/04/06/websites-ive-worked-on/</link>
		<comments>http://blog.mauveweb.co.uk/2008/04/06/websites-ive-worked-on/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 23:56:43 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=135</guid>
		<description><![CDATA[I was pondering recently about how many websites I&#8217;ve worked on over the years. A lot of the experiences I&#8217;ve taken away from those websites is now so routine I don&#8217;t even think about the actual experiences I&#8217;ve had. But I like to look back from time to time and think about how far I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>I was pondering recently about how many websites I&#8217;ve worked on over the years. A lot of the experiences I&#8217;ve taken away from those websites is now so routine I don&#8217;t even think about the actual experiences I&#8217;ve had. But I like to look back from time to time and think about how far I&#8217;ve come.</p>
<p>Websites don&#8217;t usually include credits other than an attribution in the footer. So this is a list of the websites I have personally been involved in (that I can remember at the moment).</p>
<ul>
<li>Abacus Marketing</li>
<li>Active Fire Management</li>
<li>Ad Media Cover</li>
<li>Aldershaw Tiles</li>
<li>A M Skips</li>
<li>Ashdown Leisure</li>
<li>A&amp;S Tooling</li>
<li>AV Electronics</li>
<li>Beautycube</li>
<li>Benalcosta</li>
<li>Best Magnets</li>
<li>Blah Blah Blah Lifestyle Management</li>
<li>Cambridge Garage</li>
<li>Charles Peck</li>
<li>Chichester Cinema</li>
<li>Chris Dawson Associates</li>
<li>Cliffords of Brighton</li>
<li>Cobasco</li>
<li>CUSC</li>
<li>Cyprop</li>
<li>Decoration By Design</li>
<li>Demolition Paintball</li>
<li>Design LSM</li>
<li>Dijon Miniatures</li>
<li>Direct AIM</li>
<li>DK Beer</li>
<li>Duropal</li>
<li>Echit</li>
<li>EMS Medical</li>
<li>First Finance</li>
<li>Fitness First</li>
<li>Freestyle Off-road</li>
<li>Gary Richard Homes</li>
<li>Glenn Freight</li>
<li>Global Guidebook</li>
<li>Gold Arts</li>
<li>Go Letting</li>
<li>Guitar Junction</li>
<li>Harbour Freight</li>
<li>Heritage Photo Albums</li>
<li>Hildenborough Volvo</li>
<li>Hybrand</li>
<li>Impact Promotional Workwear</li>
<li>Impact Uniforms</li>
<li>In-House Design</li>
<li>Joe Macari Cars</li>
<li>Just Computing</li>
<li>Kingscroft Volvo</li>
<li>Kylie Kanga</li>
<li>Lara Marketing</li>
<li>Limpio Group</li>
<li>Limpio Office Solutions</li>
<li>Locations In The Sun</li>
<li>London Property Finders</li>
<li>Lucy In Paris</li>
<li>Marshalls Volvo</li>
<li>MICE Intranet CMS</li>
<li>MICE IT</li>
<li>Motor Trade Link</li>
<li>Neal Smith</li>
<li>Northshore Yachts</li>
<li>Nutravida</li>
<li>Parkside Cars</li>
<li>Peter Taylor Associates</li>
<li>Peugeot Express</li>
<li>Photography2You</li>
<li>Pick A Point</li>
<li>Picture Find</li>
<li>Point 2 Point</li>
<li>Pope Consulting</li>
<li>Port Agric</li>
<li>Portsmouth Grammar School</li>
<li>Protech Component Consultants</li>
<li>Provincial &amp; Western Homes</li>
<li>Railtrack Plc. Intranet</li>
<li>RROOPP</li>
<li>Saje uPVC</li>
<li>Shoes 4 All</li>
<li>South East Labels</li>
<li>Southern Counties Fuels</li>
<li>Southern Counties Glass</li>
<li>Stickwise</li>
<li>Tempcon</li>
<li>Temple Mews</li>
<li>The Icon</li>
<li>The RM2 Partnership</li>
<li>The Top Edge</li>
<li>Top Brass International</li>
<li>Top Sinks</li>
<li>Trinity College, Cambridge</li>
<li>Turbosound</li>
<li>Urgent Fuel Oils</li>
<li>Wadhurst Country Services</li>
<li>Weybridge Group</li>
<li>Wood Wharf</li>
<li>Yacht Solutions</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/04/06/websites-ive-worked-on/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Defensive Design for the Web</title>
		<link>http://blog.mauveweb.co.uk/2008/02/29/defensive-design-for-the-web/</link>
		<comments>http://blog.mauveweb.co.uk/2008/02/29/defensive-design-for-the-web/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 12:48:46 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
		
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2008/02/29/defensive-design-for-the-web/</guid>
		<description><![CDATA[Among the many web development books in my library is a book called Defensive Design for the Web  which I bought a couple of years ago. It&#8217;s a catalogue of usability tips, complete with examples of websites successes and failures.  I strongly recommend it to anyone who programs web applications.
A lot of web [...]]]></description>
			<content:encoded><![CDATA[<p>Among the many web development books in my library is a book called <a href=" http://www.amazon.co.uk/Defensive-Design-Web-Improve-Messages/dp/073571410X/">Defensive Design for the Web</a>  which I bought a couple of years ago. It&#8217;s a catalogue of usability tips, complete with examples of websites successes and failures.  I strongly recommend it to anyone who programs web applications.</p>
<p>A lot of web usability is common sense, but when you compile all that common sense into a book, it&#8217;s an extremely valuable reference.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/02/29/defensive-design-for-the-web/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
