You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Armin Le Grand <Ar...@me.com> on 2011/10/04 11:57:38 UTC

Re: Solve SVG visualization without cairo and librsvg

On 27.09.2011 10:18, Armin Le Grand wrote:
> Hi *,
>
> I wanted to keep you up to date that I started looking for a replacement
> of SVG embedding functionality in the trunk version. This is needed
> since cairo and librsvg are gpl/lgpl and thus need to be avoided for an
> Apache release.

	Hi *,

I just wanted to keep you all updated on what is going on SVG 
replacement. I have now invested one week and there are three basic 
possibilities:

(a) Deactivate building the SVG rendering component 
vcl/source/components/rasterizer_rsvg.cxx. This would be the minimal 
solution for solving the copyright problems.

Advantages:
- Quick and easy to do

Disadvantages:
- Losing some SVG functionality again
- Inserting SVG would be possible, would not be interpreted 
(shown/printed/exported). It would be saved and loaded
- Loading files where SVG was inserted is possible, the alternate 
visualisation in the metafile data would be used
- Other office version loading a AOO 3.4 file and having SVG support 
would work

(b) Replacing the SVG renderer component to use something else (Batik 
would be the best candidate with Apache licence compatibility as it seems)

Advantages:
- SVG would stay supported, as bitmap graphic as currently

Disadvantages:
- mem/speed concerns with java
- still an external renderer, screen and all outputs would use a bitmap 
visualization

(c) Write an own SVG importer for AOO

Advantages:
- vector graphic stays vector graphic, esp. in all outputs. No pixel 
blocks when zooming in
- future migration way to not only integrate, but also break up in 
SdrObjects and edit content
- Needs to interpreted only once (to primitives), not each time an 
external renderer needs to create a new bitmap replacement
- future usage of included animations possible (smil)

Disadvantages:
- Huge task, but not rocket science, well documented
- Timeframe is not clear

I experimented with (a) and (c) up to now. I invested ca. one week in 
(c) to estimate the do-ability. I can already import the tiger and other 
examples quite well, but still a lot has to be done. The abstract SVG 
importer I started needs to be extended, but has shown the last days to 
be a good base to do so. Representing SVG as primitives is also pretty 
well doable, showing that this goes in the right direction.

I will spend another week and see how I can progress. If I will not be 
able to advance with the necessary speed, I will probably fallback to (b).


Sincerely,
Armin
-- 
ALG


Re: Solve SVG visualization without cairo and librsvg

Posted by Armin Le Grand <Ar...@me.com>.
	Hi Regina,

On 13.10.2011 22:42, Regina Henschel wrote:
> Hi Armin,
>
> Armin Le Grand schrieb:
>> Hi Dave,
>>
>> On 11.10.2011 19:33, Dave Fisher wrote:
>>> Hi Armin,
>>>
>>> Sorry for the delayed response. I'm more a project manager than coder
>>> these days.
>>
>> Ah. Now I'm late, since I'm more a coder than a project manager ;-)
>>
>>> I have a more overall than detailed view. There is a lot
>>> of value in the Java2D approach - it can provide a gateway to a large
>>> number of output formats.
>>
>> I was more looking for examples parsing SVG. You talk about writing SVG,
>> is that correct? I'm currently in reading SVG, so if someone has
>> examples, let me know. I also welcome SVG files which contain the more
>> unusual stuff as examples. So, if someone has already put time into this
>> and has good examples (or example files which cover most of SVG) I would
>> be happy.
>>
>
> Shouldn't the test suites from w3.org cover all SVG commands?
> http://www.w3.org/Graphics/SVG/WG/wiki/Test_Suite_Overview

Yes, already looking at those. Thanks!

> The download contains a folder with the pure svg files.
>
> Kind regards
> Regina
>
>

Sincerely,
	Armin
--
ALG


Re: Solve SVG visualization without cairo and librsvg

Posted by Regina Henschel <rb...@t-online.de>.
Hi Armin,

Armin Le Grand schrieb:
> Hi Dave,
>
> On 11.10.2011 19:33, Dave Fisher wrote:
>> Hi Armin,
>>
>> Sorry for the delayed response. I'm more a project manager than coder
>> these days.
>
> Ah. Now I'm late, since I'm more a coder than a project manager ;-)
>
>> I have a more overall than detailed view. There is a lot
>> of value in the Java2D approach - it can provide a gateway to a large
>> number of output formats.
>
> I was more looking for examples parsing SVG. You talk about writing SVG,
> is that correct? I'm currently in reading SVG, so if someone has
> examples, let me know. I also welcome SVG files which contain the more
> unusual stuff as examples. So, if someone has already put time into this
> and has good examples (or example files which cover most of SVG) I would
> be happy.
>

Shouldn't the test suites from w3.org cover all SVG commands?
http://www.w3.org/Graphics/SVG/WG/wiki/Test_Suite_Overview

The download contains a folder with the pure svg files.

Kind regards
Regina


Re: Solve SVG visualization without cairo and librsvg

Posted by eric b <er...@free.fr>.
Hi Armin,


Le 16 nov. 11 à 13:45, Armin Le Grand a écrit :
> On 16.11.2011 07:30, eric b wrote:
>> You mean you are implementing native svg inside OOo ?
>
> Exactly, and I'm making good progress. It's an interpreter which  
> converts SVG to a sequence of primitives, the new graphic  
> representations used internally for newest stuff.
>

  :-)


>>> Due to the IP clearance process I have now prepared an early  
>>> patch to
> [..]
>> need)
>
> You are more than welcome. I'm not sure how do do that, though.
> Should I commit the current version in a branch already?


Can we use diff's  ?  e.g. send me a patch (off list prefered), and  
I'll review / build and test it.  I can build everywhere (Mac Linux,  
or even Windows), and this is important to catch problems / issues.

Not sure you use IRC, but this is a nice tool too, for discuss about  
the design, choices in the code, tests and so on.


Not completely off topic : we'll have to redefine "child workspaces"  
with the current Apache repo (will start another thread).


> It's not finished yet, not in a form to commit it to trunk completely.
>


No problem, I perfectly understand what write new code means  :-)


Regards,
Eric


-- 
qɔᴉɹə
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news






Re: Solve SVG visualization without cairo and librsvg

Posted by Armin Le Grand <Ar...@me.com>.
	Hi eric,

On 16.11.2011 07:30, eric b wrote:
> Le 11 nov. 11 à 11:27, Armin Le Grand a écrit :
>
>> Hi *,
>>
>
>
> Hi Armin,
>
>
>> to keep all of you up to date, I'm making good progress with the
>> planned svg replacement with an own interpreter.
>
>
> You mean you are implementing native svg inside OOo ?

Exactly, and I'm making good progress. It's an interpreter which 
converts SVG to a sequence of primitives, the new graphic 
representations used internally for newest stuff.

>> Due to the IP clearance process I have now prepared an early patch to
[..]
> need)

You are more than welcome. I'm not sure how do do that, though. Should I 
commit the current version in a branch already? It's not finished yet, 
not in a form to commit it to trunk completely.

> Thank you very much for your impressive work !
>
>
> Regards,
> Eric
>



Re: Solve SVG visualization without cairo and librsvg

Posted by eric b <er...@free.fr>.
Le 11 nov. 11 à 11:27, Armin Le Grand a écrit :

> 	Hi *,
>


Hi Armin,


> to keep all of you up to date, I'm making good progress with the  
> planned svg replacement with an own interpreter.


You mean you are implementing native svg inside OOo ?


> Due to the IP clearance process I have now prepared an early patch  
> to disable the current svg stuff to get forward. It removes a bunch  
> of gpl/lgpl'ed libs which need to go anyways.
>
> Need to go here means: No longer in our own repro, but on systems  
> where possible available as system libraries. Thus, this patch  
> removes the libraries from our repository/from ext_sources to no  
> longer need them there, but actively touches just that current svg  
> functionality.
>
> The libraries are:
> librsvg, libcroco, libgsf, gdk-pixbuf, glib, gettext and pango.
>

Ok.


> I'll keep you up to date with the current svg replacement I am  
> working on. I can import things like tiger and tux, but also all  
> examples of the SVG spec 1.1, thus svg gradients and text on curve  
> as well (no, please do not discuss about the usefulness of this  
> here, it's in there and needs to be supported :-)). It should be a  
> matter of weeks to a first usable, comittable version...
>


Sorry for the long latency answer, but please note that if you need a  
tester for your experimental code, I can review it and/or have a  
look, and build on any OS (just tell me the exact goal/frame for the  
build you need)


Thank you very much for your impressive work !


Regards,
Eric

-- 
qɔᴉɹə
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news






Re: Solve SVG visualization without cairo and librsvg

Posted by Armin Le Grand <Ar...@me.com>.
	Hi *,

to keep all of you up to date, I'm making good progress with the planned 
svg replacement with an own interpreter. Due to the IP clearance process 
I have now prepared an early patch to disable the current svg stuff to 
get forward. It removes a bunch of gpl/lgpl'ed libs which need to go 
anyways.

Need to go here means: No longer in our own repro, but on systems where 
possible available as system libraries. Thus, this patch removes the 
libraries from our repository/from ext_sources to no longer need them 
there, but actively touches just that current svg functionality.

The libraries are:
librsvg, libcroco, libgsf, gdk-pixbuf, glib, gettext and pango.

I'll keep you up to date with the current svg replacement I am working 
on. I can import things like tiger and tux, but also all examples of the 
SVG spec 1.1, thus svg gradients and text on curve as well (no, please 
do not discuss about the usefulness of this here, it's in there and 
needs to be supported :-)). It should be a matter of weeks to a first 
usable, comittable version...

Sincerely,
	Armin

On 13.10.2011 19:41, Armin Le Grand wrote:
> Hi Dave,
>

[..]
--
ALG


Re: Solve SVG visualization without cairo and librsvg

Posted by Armin Le Grand <Ar...@me.com>.
	Hi Dave,

On 11.10.2011 19:33, Dave Fisher wrote:
> Hi Armin,
>
> Sorry for the delayed response. I'm more a project manager than coder
> these days.

Ah. Now I'm late, since I'm more a coder than a project manager ;-)

> I have a more overall than detailed view. There is a lot
> of value in the Java2D approach - it can provide a gateway to a large
> number of output formats.

I was more looking for examples parsing SVG. You talk about writing SVG, 
is that correct? I'm currently in reading SVG, so if someone has 
examples, let me know. I also welcome SVG files which contain the more 
unusual stuff as examples. So, if someone has already put time into this 
and has good examples (or example files which cover most of SVG) I would 
be happy.

> On Oct 6, 2011, at 1:52 AM, Armin Le Grand wrote:
>
>> Hi Dave,
>>
>> On 05.10.2011 18:05, Dave Fisher wrote:
>>>
>>> On Oct 4, 2011, at 2:57 AM, Armin Le Grand wrote:
>>>
>>>> On 27.09.2011 10:18, Armin Le Grand wrote:
>> ...
>>>> - still an external renderer, screen and all outputs would use
>>>> a bitmap visualization
>>>
>>> Yes, it is still external, but it seems to support SVG->   EPS
>>> and PDF.
>>
>> ...by using the bitmap from the external renderer as Bitmap action,
>> unfortunately (AFAIK).
>>
>>>>
>> ...
>>>> I will spend another week and see how I can progress. If I will
>>>> not be able to advance with the necessary speed, I will
>>>> probably fallback to (b).
>>>
>>> In Apache POI we've had success writing Java2D engines that
>>> output PPT, PPTX, and Microsoft's "Escher" drawing layers.
>>
>> I looked but could not find something about SVG. Since I'm pretty
>> interested, could you please give some more data? Maybe a link into
>> the repository where SVG gets involved?
>
> Actually I should have written "Using Apache POI" instead of "in
> Apache POI". Producing SVG is currently on our project list at work
> and I would like for Yegor to go into some detail about Java2D engine
> architecture.
>
> This may be AOOo 4.0 track work ...
>
> Regards, Dave
>
>>
>> Thanks in advance, Armin
>>
>>> Regards, Dave
>>>
>>>>
>>>>
>>>> Sincerely, Armin
>>
>> -- ALG
>>
>
>
Sincerely,
	Armin
--
ALG


Re: Solve SVG visualization without cairo and librsvg

Posted by Dave Fisher <da...@comcast.net>.
Hi Armin,

Sorry for the delayed response. I'm more a project manager than coder these days. I have a more overall than detailed view. There is a lot of value in the Java2D approach - it can provide a gateway to a large number of output formats.

On Oct 6, 2011, at 1:52 AM, Armin Le Grand wrote:

> 	Hi Dave,
> 
> On 05.10.2011 18:05, Dave Fisher wrote:
>> 
>> On Oct 4, 2011, at 2:57 AM, Armin Le Grand wrote:
>> 
>>> On 27.09.2011 10:18, Armin Le Grand wrote:
> ...
>>> - still an external renderer, screen and all outputs would use a bitmap visualization
>> 
>> Yes, it is still external, but it seems to support SVG->  EPS and PDF.
> 
> ...by using the bitmap from the external renderer as Bitmap action, unfortunately (AFAIK).
> 
>>> 
> ...
>>> I will spend another week and see how I can progress. If I will not be able to advance with the necessary speed, I will probably fallback to (b).
>> 
>> In Apache POI we've had success writing Java2D engines that output PPT, PPTX, and Microsoft's "Escher" drawing layers.
> 
> I looked but could not find something about SVG. Since I'm pretty interested, could you please give some more data? Maybe a link into the repository where SVG gets involved?

Actually I should have written "Using Apache POI" instead of "in Apache POI". Producing SVG is currently on our project list at work and I would like for Yegor to go into some detail about Java2D engine architecture.

This may be AOOo 4.0 track work ...

Regards,
Dave

> 
> Thanks in advance,
> 	Armin
> 
>> Regards,
>> Dave
>> 
>>> 
>>> 
>>> Sincerely,
>>> Armin
> 
> -- 
> ALG
> 


Re: Solve SVG visualization without cairo and librsvg

Posted by Armin Le Grand <Ar...@me.com>.
	Hi Dave,

On 05.10.2011 18:05, Dave Fisher wrote:
>
> On Oct 4, 2011, at 2:57 AM, Armin Le Grand wrote:
>
>> On 27.09.2011 10:18, Armin Le Grand wrote:
...
>> - still an external renderer, screen and all outputs would use a bitmap visualization
>
> Yes, it is still external, but it seems to support SVG->  EPS and PDF.

...by using the bitmap from the external renderer as Bitmap action, 
unfortunately (AFAIK).

>>
...
>> I will spend another week and see how I can progress. If I will not be able to advance with the necessary speed, I will probably fallback to (b).
>
> In Apache POI we've had success writing Java2D engines that output PPT, PPTX, and Microsoft's "Escher" drawing layers.

I looked but could not find something about SVG. Since I'm pretty 
interested, could you please give some more data? Maybe a link into the 
repository where SVG gets involved?

Thanks in advance,
	Armin

> Regards,
> Dave
>
>>
>>
>> Sincerely,
>> Armin

-- 
ALG


Re: Solve SVG visualization without cairo and librsvg

Posted by Dave Fisher <da...@comcast.net>.
On Oct 4, 2011, at 2:57 AM, Armin Le Grand wrote:

> On 27.09.2011 10:18, Armin Le Grand wrote:
>> Hi *,
>> 
>> I wanted to keep you up to date that I started looking for a replacement
>> of SVG embedding functionality in the trunk version. This is needed
>> since cairo and librsvg are gpl/lgpl and thus need to be avoided for an
>> Apache release.
> 
> 	Hi *,
> 
> I just wanted to keep you all updated on what is going on SVG replacement. I have now invested one week and there are three basic possibilities:
> 
> (a) Deactivate building the SVG rendering component vcl/source/components/rasterizer_rsvg.cxx. This would be the minimal solution for solving the copyright problems.
> 
> Advantages:
> - Quick and easy to do
> 
> Disadvantages:
> - Losing some SVG functionality again
> - Inserting SVG would be possible, would not be interpreted (shown/printed/exported). It would be saved and loaded
> - Loading files where SVG was inserted is possible, the alternate visualisation in the metafile data would be used
> - Other office version loading a AOO 3.4 file and having SVG support would work
> 
> (b) Replacing the SVG renderer component to use something else (Batik would be the best candidate with Apache licence compatibility as it seems)
> 
> Advantages:
> - SVG would stay supported, as bitmap graphic as currently
> 
> Disadvantages:
> - mem/speed concerns with java
> - still an external renderer, screen and all outputs would use a bitmap visualization

Yes, it is still external, but it seems to support SVG-> EPS and PDF.


> 
> (c) Write an own SVG importer for AOO
> 
> Advantages:
> - vector graphic stays vector graphic, esp. in all outputs. No pixel blocks when zooming in
> - future migration way to not only integrate, but also break up in SdrObjects and edit content
> - Needs to interpreted only once (to primitives), not each time an external renderer needs to create a new bitmap replacement
> - future usage of included animations possible (smil)
> 
> Disadvantages:
> - Huge task, but not rocket science, well documented
> - Timeframe is not clear
> 
> I experimented with (a) and (c) up to now. I invested ca. one week in (c) to estimate the do-ability. I can already import the tiger and other examples quite well, but still a lot has to be done. The abstract SVG importer I started needs to be extended, but has shown the last days to be a good base to do so. Representing SVG as primitives is also pretty well doable, showing that this goes in the right direction.
> 
> I will spend another week and see how I can progress. If I will not be able to advance with the necessary speed, I will probably fallback to (b).

In Apache POI we've had success writing Java2D engines that output PPT, PPTX, and Microsoft's "Escher" drawing layers.

Regards,
Dave

> 
> 
> Sincerely,
> Armin
> -- 
> ALG
>