incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Le Grand <Armin.Le.Gr...@me.com>
Subject Re: how Get Bitmap file from SVG module?
Date Thu, 24 May 2012 08:32:13 GMT
	Hi Eric,

On 24.05.2012 03:43, Yong Lin Ma wrote:
> Let me try to translate the message below.

Thanks, that helped. Ansering below...

> Hi Armin,
> I see two interfaces XSVGPrinter and XSVGWriter in svg mdoule
>
> Could they be used for graphic in Bitmap format?

No.

> For function extractFromGraphic in svgimagenode
>
> void extractFromGraphic (
>              const Graphic&  rGraphic
>              drawinglayer :: primitive2d :: Primitive2DSequence&  rEmbedded,
>              basegfx :: B2DRange&  rViewBox,
>              BitmapEx&  rBitmapEx)
>
> What is parameter rBitmapEx work for?

This is a helper method in module svxio. It is not exported from the 
svgio module to make that clear. It should not be called directly and 
may change in the future.

Instead, use the classes Graphic and GraphicObject and work with the 
SvgData class used there if you want to do something in the environment 
of the office core code.

 From outside you may use the service XSvgParser to convert from 
io::XInputStream to uno::Sequence< uno::Reference< 
::graphic::XPrimitive2D > > (the imported primitive representation of 
the SVG). Then use the service XPrimitive2DRenderer to convert such a 
primitive to a rendering::XBitmap. Grep the code to find usage examples.

HTH!

> On Wed, May 23, 2012 at 5:06 PM, jianlizhao<jianlizhao6@hotmail.com>  wrote:
>> Hi Armin:
>> I ask you some question as below:
>> In  module svg, have two Interfaces, one is  XSVGPrinter, the other is
>> XSVGWriter.
>>
>> 1) Can I use these interfaces, output Bitmap file?
>>
>> 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?
>>
>> Thanks...
>> Best Regards!
>>
>



Mime
View raw message