Updating vcl EMF+ Renderer without using the cppcanvas metafile renderer

classic Classic list List threaded Threaded
5 messages Options
Aptitude Testing Team Aptitude Testing Team
Reply | Threaded
Open this post in threaded view
|

Updating vcl EMF+ Renderer without using the cppcanvas metafile renderer

Currently when we render EMF+ images, they are first rendered to a bitmap
(using a set size/resolution). This causes fonts to render poorly and pdf
export to contain the bitmap, instead of the text.

This is documented clearly in vcl/README.

To fix this, I believe that it should be possible to copy
cppcanvas/source/mtrenderer/emfplus.cxx into vcl/source/filter/wmf and adapt
it to use "class WinMtfOutput"

So, vcl draws the EMF+ in the same way as the current EMF.

The vcl/README says this is a lot of work. I am not sure exactly why this
is. It appears that it is merely a cut and paste exercise

What I would find helpful is somebody to comment on the accuracy of
vcl/README, since this section was updated a couple of years ago, the
comments may no longer be valid.

There was a comment in
http://nabble.documentfoundation.org/Query-about-the-direction-of-EMF-EMF-pr
ocessing-td4132203.html#a4132247 by Thorsten that suggests there are further
issues.

Thanks.



_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Thorsten Behrens-6 Thorsten Behrens-6
Reply | Threaded
Open this post in threaded view
|

Re: Updating vcl EMF+ Renderer without using the cppcanvas metafile renderer

Aptitude Testing Team wrote:
> To fix this, I believe that it should be possible to copy
> cppcanvas/source/mtrenderer/emfplus.cxx into vcl/source/filter/wmf
> and adapt it to use "class WinMtfOutput"
>
I'd move it instead of copying. WinMtfOutput as-is won't cut it, you
need to extend it to cover more modern graphic operations. Caveat
emptor, that might require extensions to the internal StarView
metafile format then with some ripple-effects.

Another (IMO better) option is to convert it into a drawinglayer
primitive filter. Armin on Cc for further details on that topic.

> There was a comment in
> http://nabble.documentfoundation.org/Query-about-the-direction-of-EMF-EMF-pr
> ocessing-td4132203.html#a4132247 by Thorsten that suggests there are further
> issues.
>
Nah, that was referring to dump cppcanvas - getting rid of EMF+ there
is a useful first step.

Cheers,

-- Thorsten

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (968 bytes) Download Attachment
Aptitude Testing Team Aptitude Testing Team
Reply | Threaded
Open this post in threaded view
|

RE: Updating vcl EMF+ Renderer without using the cppcanvas metafile renderer


> > To fix this, I believe that it should be possible to copy
> > cppcanvas/source/mtrenderer/emfplus.cxx into vcl/source/filter/wmf
> and
> > adapt it to use "class WinMtfOutput"
> >
> I'd move it instead of copying. WinMtfOutput as-is won't cut it, you
> need to extend it to cover more modern graphic operations. Caveat
> emptor, that might require extensions to the internal StarView metafile
> format then with some ripple-effects.
>
> Another (IMO better) option is to convert it into a drawinglayer
> primitive filter. Armin on Cc for further details on that topic.
>

Thinking about it. I believe the best approach will be to use svgio as a
framework (I will call it wmfio). Since svg (I believe) is the newest.
Then in 4 stages, slowly port the WMF/EMF/EMF+ code
1) WMF
2) EMF
3) EMF+
4) Strip out the old code (If any remnants exist).

I will make a start, and see where it takes me.



_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Thorsten Behrens-6 Thorsten Behrens-6
Reply | Threaded
Open this post in threaded view
|

Re: Updating vcl EMF+ Renderer without using the cppcanvas metafile renderer

Aptitude Testing Team wrote:
> Thinking about it. I believe the best approach will be to use svgio as a
> framework (I will call it wmfio). Since svg (I believe) is the newest.
> Then in 4 stages, slowly port the WMF/EMF/EMF+ code
> 1) WMF
> 2) EMF
> 3) EMF+
> 4) Strip out the old code (If any remnants exist).
>
Sounds great! :)

Cheers,

-- Thorsten

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (968 bytes) Download Attachment
Armin Le Grand-2 Armin Le Grand-2
Reply | Threaded
Open this post in threaded view
|

Re: Updating vcl EMF+ Renderer without using the cppcanvas metafile renderer

In reply to this post by Aptitude Testing Team

Hi,

Am 12.05.2016 um 08:27 schrieb Aptitude Testing Team:

      
To fix this, I believe that it should be possible to copy
cppcanvas/source/mtrenderer/emfplus.cxx into vcl/source/filter/wmf
and
adapt it to use "class WinMtfOutput"

I'd move it instead of copying. WinMtfOutput as-is won't cut it, you
need to extend it to cover more modern graphic operations. Caveat
emptor, that might require extensions to the internal StarView metafile
format then with some ripple-effects.

Another (IMO better) option is to convert it into a drawinglayer
primitive filter. Armin on Cc for further details on that topic.

Thinking about it. I believe the best approach will be to use svgio as a
framework (I will call it wmfio). Since svg (I believe) is the newest.
Then in 4 stages, slowly port the WMF/EMF/EMF+ code
1) WMF
2) EMF
3) EMF+
4) Strip out the old code (If any remnants exist).

I will make a start, and see where it takes me.

Fantastic, long needed thing to start with - ping if you have questions!

Regards,
ALG




_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

-- 
--
ALG (PGP Key: EE1C 4B3F E751 D8BC C485 DEC1 3C59 F953 D81C F4A2)

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice