incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianlizhao <jianlizh...@hotmail.com>
Subject how Get Bitmap file from SVG module?
Date Thu, 24 May 2012 08:57:07 GMT
Hi Armin:
Read your letter, I know my idea is stupid.

I would like to achieve an ADDON expansion in openoffice's write,
The extension function is plug a new type of picture into openoffice's
write, need following requirements

1) There were also ODF-compatible File Format adaptions needed.That is to
say,
   That is not installed the extended  on the openoffice's write  can open
the saved file.
2) If the extension is installed, can use the extended functionality to deal
with the inserted picture.

This function is very similar to  your SVGIO, so I need to look deeper
SVGIO.
Then modeled this idea, realization my needs.

I have installed openoffice's SDK.Debugging through a simple C++ example of
the addon.
Do you have any good suggestions.

Thanks...
Best Regards!



-----邮件原件-----
发件人: Armin Le Grand [mailto:Armin.Le.Grand@me.com] 
发送时间: 2012年5月23日 20:51
收件人: ooo-dev@incubator.apache.org
主题: Re: how Get Bitmap file from SVG module?

	Hi jianlizhao,

On 23.05.2012 11:06, jianlizhao wrote:
> Hi Armin:
> I ask you some question as below:
> In  module svg, have two Interfaces, one is  XSVGPrinter, the other is
> XSVGWriter.

Both are interfaces, XSVGPrinter is not used at all and XSVGWriter is 
the current SVG export which has nothing to do with the new import. 
There also is no module svg, the module I added for the new SVG import 
is svgio.

> 1) Can I use these interfaces, output Bitmap file?

No.

> 2) under the module svg, in the file of svgimagenode.cxx,
>
> void extractFromGraphic (
>              const Graphic&  rGraphic
>              drawinglayer :: primitive2d :: Primitive2DSequence&
rEmbedded,
>              basegfx :: B2DRange&  rViewBox,
>              BitmapEx&  rBitmapEx)
>
> is the  parameters rBitmapEx get Bitmap file?

I am not sure what you want to do. To work with imported SVGs you need a 
Graphic (see vcl and GraphicObject, too) where it is loaded. From 
Graphic you may try

     const SvgDataPtr& getSvgData() const;

If getSvgData().is() there is a SVG graphic. At the contained SvgData 
you can use

     const BitmapEx& getReplacement() const;

to get the BitmapEx of the SVG. There is no need to work with stuff from 
svgio directly. All usages work with it are using the service XSvgParser 
and do the work for you, where XSvgParser is implemented in svgio.

I still do not understand what you want to do, please explain this, else 
I cannot really help you.

> Thanks...
> Best Regards!
>
>

Sincerely,
	Armin
--
ALG



Mime
View raw message