[Yanel-dev] svg and svg-edit resource-type

simon simon at 333.ch
Mon Jan 25 11:45:10 CET 2010


simon schrieb:
> Michael Wechner schrieb:
>> simon wrote:
>>> hi all
>>>
>>> i finished my svg and svg-edit resource-types. you can see it in 
>>> action on my demo site: http://demo.yanel-contribution.3k3.org
>>
>> this is great :-)
>>
>> Btw, if requesting for example
>>
>> http://demo.yanel-contribution.3k3.org/svg/test.svg?yanel.resource.viewid=jpg 
>>
>>
>> then I get an error within Firefox and I think the reason is because 
>> instead of image/jpeg the response mime type is
>>
>> image/svg+xml
>>
>> but in this case it's really a jpeg file, hence I think Firefox gets 
>> confused.
> the problem is the apache mod_proxy which seems to rewrite mime-types. 
> not sure how to fix this.
>>
>> Also I think it would be nice to deliver a jpg based on svg without 
>> the query-string, but I assume this can be configured, right?
> this is already possible. the view is not only changeable via 
> yanel.resource.viewid paramater but also via extension. if you request 
> http://demo.yanel-contribution.3k3.org/svg/test.jpg it's the same as  
> http://demo.yanel-contribution.3k3.org/svg/test.svg?yanel.resource.viewid=jpg. 
>
>
> at least if the matcher is configured that greedy e.g. /svg/**.*
i found a better way to configure this. i added matcher like this:
  <matcher pattern="**.svg.png" rcpath="/svg.yanel-rc"/>
  <matcher pattern="**.svg.jpg" rcpath="/svg.yanel-rc"/>
  <matcher pattern="**.svg.html" rcpath="/svg.yanel-rc"/>
  <matcher pattern="**.svg" rcpath="/svg.yanel-rc"/>
and now the bitmaps are reachable like this: test.svg.png. this works 
behind an apache and even don't forces you to store all svg in certain 
folder.

another point: it seems to me i have a problem with batik running on a 
headless server. the bitmaps are looking strange. on my local computer i 
don't have this problem.

BTW i update svg-edit to its newest version (2.4).

cheers
simon
>
> BTW this was also a reason why i thought it would be nice if the 
> resource-type has a methode createRC(request). in this case it could 
> create 4 rc files. for each possible extension one. e.g. if you create 
> a test.svg file it would create a test.svg.yanel-rc and a 
> test.jpg.yanel-rc and a test.png.yanel-rc and a test.html.yanel-rc.
>
> cheers
> simon
>>>  
>>> whereas the svg resource-type seems to have some problems with 
>>> gradients if running in a headless environment.
>>>
>>> hope you have fun...
>>
>> We will have a project with vertically aligned text and hence I think 
>> we will give it a real try shortly ;-)
>>
>> Thanks for sharing this.
>>
>> Michi
>>>
>>> BTW the svg-edit team just released a new version of svg-edit. hope 
>>> i will update my svg-edit resource-type soon.
>>>
>>> cheers
>>> simon
>>
>



More information about the Yanel-development mailing list