Re: [svg-developers] Re: Organized Crime in American Web Design

2010-11-07 Thread Erik Dahlstrom
On Sat, 06 Nov 2010 02:19:49 +0100, jamesd jcdeeri...@yahoo.com wrote:


 In order to serve compressed svg file you must specify

 Content-Encoding: gzip


 And where do I specify the Content-Encoding: gzip? If it is on the  
 server and I don't have access to it, then I stand by my statements.

If you put your content on the server then I think you do have access.  
According to the headers your server is Apache, so try uploading a file  
named .htaccess (without the quotes) with the following raw text content:

# Adding the SVG media type and encoding in case they aren't already
AddType image/svg+xml svg svgz
AddEncoding gzip  svgz
AddCharset  utf-8 .svg


If you want, you don't actually have to rename your files to *.svgz, and  
instead just let the server transmit the files using gzip compression  
automatically. To get this you can append the following to the .htaccess  
file:

# gzip compression.
IfModule mod_deflate.c
   # html, txt, css, js, json, xml, htc:
   AddOutputFilterByType DEFLATE text/html text/plain text/css  
application/json
   AddOutputFilterByType DEFLATE text/javascript application/javascript  
application/x-javascript
   AddOutputFilterByType DEFLATE text/xml application/xml text/x-component

   # webfonts and svg:
   FilesMatch \.(ttf|otf|eot|svg)$ 
 SetOutputFilter DEFLATE
   /FilesMatch
/IfModule


To conclude I would like to recommend browsing the following two sites for  
some tips  tricks on serving web content:

   http://html5boilerplate.com
   http://svgboilerplate.com

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed




-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[svg-developers] Re: Organized Crime in American Web Design

2010-11-07 Thread t...@ymail.com
--- In svg-developers@yahoogroups.com, Erik Dahlstrom e...@... wrote:

 On Sat, 06 Nov 2010 02:19:49 +0100, jamesd jcdeeri...@... wrote:
 
 
  In order to serve compressed svg file you must specify
 
  Content-Encoding: gzip
 
 
  And where do I specify the Content-Encoding: gzip? If it is on the  
  server and I don't have access to it, then I stand by my statements.
 
 If you put your content on the server then I think you do have access.  
 According to the headers your server is Apache, so try uploading a file  
 named .htaccess (without the quotes) with the following raw text content:
 
 # Adding the SVG media type and encoding in case they aren't already
 AddType image/svg+xml svg svgz
 AddEncoding gzip  svgz
 AddCharset  utf-8 .svg
 
 
 If you want, you don't actually have to rename your files to *.svgz, and  
 instead just let the server transmit the files using gzip compression  
 automatically. To get this you can append the following to the .htaccess  
 file:
 
 # gzip compression.
 IfModule mod_deflate.c
# html, txt, css, js, json, xml, htc:
AddOutputFilterByType DEFLATE text/html text/plain text/css  
 application/json
AddOutputFilterByType DEFLATE text/javascript application/javascript  
 application/x-javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
 
# webfonts and svg:
FilesMatch \.(ttf|otf|eot|svg)$ 
  SetOutputFilter DEFLATE
/FilesMatch
 /IfModule
 
 

Yeah, you can count on the Good Guys from Europe!  In your face, American Web 
Design Criminals!

Kidding aside, many thanks for this post!  Up to now I uploaded my SVG and XSLT 
files with extension .xml.  That works, but it's nicer with the proper 
extension.

Thomas W.





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [svg-developers] how to visualise an arbitrary size matrix with svg?

2010-11-07 Thread Cameron Laird
On Sun, Oct 24, 2010 at 02:15:20PM +0100, Jonathan Chetwynd wrote:
.
.
.
 2 Queries around the same idea:
 
 1:Is there a simple way to visualise an arbitrary size matrix with svg?
 ie say: vary opacity or hue, as a gradient over another arbitrary size  
 rectangle.
 
 very basic method: fill in a rectangle for each value  in the matrix
 
 one longwinded method: use radial gradient with
 one stop 0.24 and another using a 3x3 kernel to give an average value   
 ~0.2575**
 and a radius calculated from the scale of the matrix (19x19) to the  
 displayed size of the  graphic
 
 
 2:is there a way to input colour or alpha values  for an image  
 directly?
 as suggested here: To illustrate, suppose you have a input image  
 which is 5 pixels by 5 pixels, whose color values for one of the color  
 channels are as follows:
 http://www.w3.org/TR/SVG/filters.html#feConvolveMatrixElement
 
 Jonathan
 
 **using the value at the second row and second column of the matrix  
 attached:
.
.
.
I know mathematics, and SVG, but I truly don't see the 
connection you're making here.  I suspect a lot of it
has to do with simple way--no, it's a certainty that
pathologic cases will break any such scheme you propose,
but, yes, if you have information about the matrix that
perhaps is obvious to you, but I don't apprehend, then
useful visualizations are feasible.

I'd love to understand better what you have in mind.
What would it take to make a minimal example of matrix
visualization for you?




-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [svg-developers] canonical expressions -- part 2: A challenge: accessbility and symbols of the public domain (wikipedia)

2010-11-07 Thread ddailey
Challenge: come up with better symbols for signifying public domain or 
copyright free.

Begin here http://granite.sru.edu/~ddailey/svg/pd3.svg . Look at the source 
code and then see what you think. I'll get back to that example toward the end 
of this message.

As a bit of searching in Google Images*, Wikipedia and Wikimedia Commons will 
reveal,  there are several symbols meant to depict the concepts of copyright 
free or public domain or copyleft. Not only do these concepts have 
slightly different nuances of meaning, but the symbols have a many-to-many 
relationship with the concepts. And furthermore, the symbols have differential 
levels of accessibity, depending on for whom we define making allowing or 
enabling  to be accessible. And, many of the symbols, while looking alike, 
have very different underlying file structure.

Following a recent visit to openclipart.org**  I was rather prepared for what 
Jeff Schiller calls cruft  when I saw the earlier image at 
http://commons.wikimedia.org/wiki/File:Publicdomain.svg
as described there.I did the following   [Hand edited to remove sodipodi and 
inkscape references, remove unused gradients, remove unused styles, replaced 
duplicated paths by use elements, simplified complex cubic beziers as simple 
arc subcommands; used integer arithmetic. Replaced complex arcs by circles. New 
file is 18 (lkb) lines of code -- old file was 144 lines (5kb). New file 
should have better semantics for re-editing basic objects.]

Well 18 lines and 895 bytes defintely seems better than 5 kilobytes of code. 
But is the new code more accessible? Well, I think it is, but how can I tell 
for sure? How does one come up with the best expression for such a simple 
figure?

Look inside the two figures and you'll see several questions that pose 
themselves: 
is it better to use use?
does striking all the sodipodi stuff erase some of the artist's brushstrokes?***
are two paths with one rotating the other better than one that has twice as 
coordinates listed?
doesn't it make more sense to let color be inherited from the group rather than 
individually defined for each path?
what about the optical illusion of the letters pd for public domain? Should 
that be made semantic in our markup?

I confess it took me a while of fidding to replace all those cubic beziers from 
Inkscape by the canonical arc-equivalents. But I figure that the seven 
coordinates (or so) that I used,  instead of sixty or so in the original path 
ought to make the content more accessible to future analysists if anyone ever 
wants to modify it!

Next question (and maybe more important):

Take a look at http://granite.sru.edu/~ddailey/svg/pd3.svg

The image on the left is one of the current images served by wikimedia as the 
symbol for copyright free.[2]  Perhaps it is based on [3] . Perhaps the 
metadata associated with the file should show its ancestry?

The file history shows some well-deserved attempt to rid the file of unneeded 
complexity and cruft.
The current image (in its eleventh incarnation on wikipedia). It consists of 
four circles and three rectangles. One of the rectangles looks like it has been 
added merely to carve out a portion of a circle to make it look like a c. 
This doesn't seem very accessible. 

So in my quick attempt, I put a c in the middle of the circle. I defined the 
circle as not two circles but one. I defined the rectangle as not two but one, 
and I defined the C as not two circles and a rectangle, but as a c. I also 
made a stab at adding title and desc tags to describe the why and what of 
the file.

So here is the challenge: can we come up with a better version of the symbol 
that what is there right now?

Can we come up with one we will all agree is better?

What I don't like about my attempt is that the C is dependent upon system 
fonts??? Changing from sans-serif to arial makes a huge difference in some 
browsers!

Should the circle be one circle or two?

Should the circle really be carved by a clipPath consisting of two arcs or 
should it be a circle with a line (rect) that crosses it? I chose a crossing 
line but was not convinced this was right.

I stretched the C horizontally to make it appear to conform to the circle 
outside. Circles would have conformed better!

What is the canonical title and desc information to go with the proper file?

What is the proper way to refer to this discussion thread should we ever agree 
on my desire to replace the four circles and three rects 

cheers
David

*I discovered to my great dismay that Ditto.com, as of about 6 months ago, no 
longer exists[1]. Their lawsuit paved the way for Google images which followed 
almost to the day the initial ruling in favor of Ditto.com.

**After spending a bit of time reminding myself of why I (wearing various hats 
that I do) don't use more images from http://www.openclipart.org/ , I wrote a 
bit of script to help me find the relevant path objects (amidst gradients and 
filters that are never used) that 

[svg-developers] Re: fun but buggy -- gears

2010-11-07 Thread bruce
Here is another interesting animation in the same vein.  It shows two sliding 
blocks, one moving horizontally and the other moving vertically.  A rod is 
pined to the centers of the two blocks.  When this is done the motion of the 
ends of the rod traces ellipses.  The following works in IE/ASV, FF4, WebKit, 
and Opera but interestingly does not work in Batik.


?xml version=1.0 standalone=no?
!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.0//EN
  http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd; [
  !ENTITY dur 9s
  !ENTITY hCirCW M -25 0 A 25 25 0 1 1 25 0 A 25 25 0 1 1 -25 0
  !ENTITY hCirCCW M -25 0 A 25 25 0 1 0 25 0 A 25 25 0 1 0 -25 0
  !ENTITY vCirCW M -25 0 A 25 25 0 1 1 25 0 A 25 25 0 1 1 -25 0
  !ENTITY vCirCCW M 25 0 A 25 25 0 1 0 -25 0 A 25 25 0 1 0 25 0
]

svg width=100% height=100% viewBox=-100 -125 200 250 
 xmlns=http://www.w3.org/2000/svg; 

rect x=-75 y=-75 width=150 height=150 fill=blue /
rect x=-75 y=-10 width=150 height=20 fill=gray /
rect x=-10 y=-75 width=20 height=150 fill=gray /
g
animateMotion begin=0s dur=dur; path=hCirCW; 
repeatCount=indefinite /
rect x=-20 y=-10 width=40 height=20 fill=green 
animateMotion begin=0s dur=dur; path=hCirCCW; 
repeatCount=indefinite /
/rect
/g

g
animateMotion begin=0s dur=dur; path=vCirCW; 
repeatCount=indefinite /
rect x=-10 y=-20 width=20 height=40 fill=green 
animateMotion begin=0s dur=dur; path=vCirCCW; 
repeatCount=indefinite /
/rect
/g

g
animateMotion begin=0s dur=dur; path=hCirCW; 
repeatCount=indefinite /
line x1=100 y1=0 x2=-50 y2=0 stroke-width=5 stroke=black 
stroke-linecap=round 
  animateTransform attributeName=transform attributeType=XML
   type=rotate from=0 to=-360
   begin=0s dur=dur; repeatCount=indefinite /
animateMotion begin=0s dur=dur; path=hCirCCW; 
repeatCount=indefinite /
/line
/g
g
animateMotion begin=0s dur=dur; path=hCirCW; 
repeatCount=indefinite /
circle x=0 y=0 r=1  fill=yellow 
animateMotion begin=0s dur=dur; path=hCirCCW; 
repeatCount=indefinite /
/circle
/g
g
animateMotion begin=0s dur=dur; path=vCirCW; 
repeatCount=indefinite /
circle x=0 y=0 r=1  fill=yellow 
animateMotion begin=0s dur=dur; path=vCirCCW; 
repeatCount=indefinite /
/circle
/g

ellipse cx=0 cy=0 rx=50 ry=100
fill=none stroke=red stroke-width=0.2  /
ellipse cx=0 cy=0 rx=100 ry=50
fill=none stroke=red stroke-width=0.2  /

/svg
-

The really strange thing is an early version of this file.  I thought it would 
be simple to replicate the code for one block and rotate it by 90 degrees to 
get the second block.  It didn't work but rotating it 180 degrees did (in 
Chrome where I was testing).  When I thought I was done, I checked in FF4 - 
same result.  In Opera, I got radically different results.  IE/ASV showed the 
same as Opera.  I believe Opera and ASV have the behavior correctly as I coded 
it.  Again Batik does not show the rod correctly  but shows the blocks as ASV 
and Opera.
Any idea why FF4 and WebKit show the same but different display?


?xml version=1.0 standalone=no?
!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.0//EN
  http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd; [
  !ENTITY dur 9s
  !ENTITY largeCirCW M -25 0 A 25 25 0 1 1 25 0 A 25 25 0 1 1 -25 0
  !ENTITY largeCirCCW M -25 0 A 25 25 0 1 0 25 0 A 25 25 0 1 0 -25 0
]

svg width=100% height=100% viewBox=-100 -150 200 300 
 xmlns=http://www.w3.org/2000/svg; 

rect x=-75 y=-75 width=150 height=150 fill=blue /
rect x=-75 y=-10 width=150 height=20 fill=gray /
rect x=-10 y=-75 width=20 height=150 fill=gray /
g
animateMotion begin=0s dur=dur; path=largeCirCW; 
repeatCount=indefinite /
rect x=-20 y=-10 width=40 height=20 fill=green 
animateMotion begin=0s dur=dur; path=largeCirCCW; 
repeatCount=indefinite /
/rect
/g

g transform=rotate(180)
animateMotion begin=0s dur=dur; path=largeCirCW; 
repeatCount=indefinite /
rect x=-10 y=-20 width=20 height=40 fill=green 
animateMotion begin=0s dur=dur; path=largeCirCCW; 
repeatCount=indefinite /
/rect
/g

g
animateMotion begin=0s dur=dur; path=largeCirCW; 
repeatCount=indefinite /
line x1=100 y1=0 x2=0 y2=0 stroke-width=5 stroke=black 
stroke-linecap=round 
  animateTransform attributeName=transform attributeType=XML
   type=rotate from=0 to=-360
   begin=0s dur=dur; repeatCount=indefinite /
animateMotion begin=0s dur=dur; path=largeCirCCW; 
repeatCount=indefinite /
/line
/g
g
animateMotion begin=0s dur=dur; path=largeCirCW; 
repeatCount=indefinite /
circle x=0 y=0 r=1  fill=yellow 
animateMotion begin=0s dur=dur; path=largeCirCCW; 

Re: [svg-developers] canonical expressions -- part 3: more efficient ways of packing text into rectangles

2010-11-07 Thread ddailey
The concept of how best to write something got me wondering about the 
following. 

Using an alphabet or a syllabary (like most of the languages of the world 
excepting Chinese, Japanese, Mayan, and a few hundred others)  how much space 
does it take to convey our meaning.*

Here's the question: if we relax the rules of English orthography just a bit, 
so that instead of writing from left to write, we write from left to right, or 
downward, or inward (by allowing glyphs to be inside one another) , can we 
write legibly in less space?

http://granite.sru.edu/~ddailey/svg/canonical.svg

This link shows a way of packing letters into a space under the relaxed rules 
of right-or-down-or-inside.

If we confine legibility by some empirically defined threshold on the minimum 
size of a glyph, then if we allow physics to constrain the two dimensional 
placement of our glyphs, subject to rotation scaling and translation, to pack 
tightly, then can we find ways of expressing English (or another language using 
some alphabet) using less space than by writing simply unidirectionally?  

Vincent Hardy's work with cameras at http://svg-wow.org/blog/2010/08/14/camera/ 
reinforces this idea that writing need not be unidirectional. And from many 
languages we know that it need not be. By what grammar might we guide the 
maximization of our expressiveness per unit of space and time?

cheers
David

* As a kid I subscribed to Quino Lingo and observed that English took up far 
less room, on average, that French, Spanish, Italian, Russian, German, Latin or 
Basque. I studied Navajo as a big kid and can testify that it takes up *room* 
to write it, though not so extravagantly as most languages. Chinese seems to be 
quite effective. 

  - Original Message - 
  From: ddailey 
  To: svg-developers@yahoogroups.com 
  Sent: Sunday, November 07, 2010 11:31 PM
  Subject: Re: [svg-developers] canonical expressions -- part 2: A challenge: 
accessbility and symbols of the public domain (wikipedia)



  Challenge: come up with better symbols for signifying public domain or 
copyright free.

  Begin here http://granite.sru.edu/~ddailey/svg/pd3.svg . Look at the source 
code and then see what you think. I'll get back to that example toward the end 
of this message.

  As a bit of searching in Google Images*, Wikipedia and Wikimedia Commons will 
reveal, there are several symbols meant to depict the concepts of copyright 
free or public domain or copyleft. Not only do these concepts have 
slightly different nuances of meaning, but the symbols have a many-to-many 
relationship with the concepts. And furthermore, the symbols have differential 
levels of accessibity, depending on for whom we define making allowing or 
enabling to be accessible. And, many of the symbols, while looking alike, 
have very different underlying file structure.

  Following a recent visit to openclipart.org** I was rather prepared for what 
Jeff Schiller calls cruft when I saw the earlier image at 
http://commons.wikimedia.org/wiki/File:Publicdomain.svg
  as described there.I did the following [Hand edited to remove sodipodi and 
inkscape references, remove unused gradients, remove unused styles, replaced 
duplicated paths by use elements, simplified complex cubic beziers as simple 
arc subcommands; used integer arithmetic. Replaced complex arcs by circles. New 
file is 18 (lkb) lines of code -- old file was 144 lines (5kb). New file 
should have better semantics for re-editing basic objects.]

  Well 18 lines and 895 bytes defintely seems better than 5 kilobytes of code. 
But is the new code more accessible? Well, I think it is, but how can I tell 
for sure? How does one come up with the best expression for such a simple 
figure?

  Look inside the two figures and you'll see several questions that pose 
themselves: 
  is it better to use use?
  does striking all the sodipodi stuff erase some of the artist's 
brushstrokes?***
  are two paths with one rotating the other better than one that has twice as 
coordinates listed?
  doesn't it make more sense to let color be inherited from the group rather 
than individually defined for each path?
  what about the optical illusion of the letters pd for public domain? Should 
that be made semantic in our markup?

  I confess it took me a while of fidding to replace all those cubic beziers 
from Inkscape by the canonical arc-equivalents. But I figure that the seven 
coordinates (or so) that I used, instead of sixty or so in the original path 
ought to make the content more accessible to future analysists if anyone ever 
wants to modify it!

  Next question (and maybe more important):

  Take a look at http://granite.sru.edu/~ddailey/svg/pd3.svg

  The image on the left is one of the current images served by wikimedia as the 
symbol for copyright free.[2] Perhaps it is based on [3] . Perhaps the 
metadata associated with the file should show its ancestry?

  The file history shows some well-deserved attempt to rid the