Re: Question: How do I rasterize an SVG to a BitmapEx

2012-02-29 Thread Thorsten Behrens
Andrew Higginson wrote: > So if I am getting the SVG from the brand/ folder in the galaxy icon theme, > what should I use to read it? > Hi Andrew, ok, some code pointers - look into vcl/source/app/brand.cxx, Application::LoadBrandBitmap() on how to get to the brand dir - note those $BRAND_BASE_DI

Re: Question: How do I rasterize an SVG to a BitmapEx

2012-02-29 Thread Andrew Higginson
Hi, On 28 February 2012 14:55, Thorsten Behrens wrote: > Andrew Higginson wrote: > > Sorry still don't understand, what class is the aSvgData? :/ > > > Hi Andrew, > > ah, that was a somewhat made-up example - uno::Sequence > for the methods I used there. But it really depends on how/where you > g

Re: Question: How do I rasterize an SVG to a BitmapEx

2012-02-28 Thread Thorsten Behrens
Andrew Higginson wrote: > Sorry still don't understand, what class is the aSvgData? :/ > Hi Andrew, ah, that was a somewhat made-up example - uno::Sequence for the methods I used there. But it really depends on how/where you get your data read. HTH, -- Thorsten pgpS75qAdVkhj.pgp Description:

Re: Question: How do I rasterize an SVG to a BitmapEx

2012-02-27 Thread Andrew Higginson
On 27 February 2012 15:04, Thorsten Behrens wrote: > Andrew Higginson wrote: > > Thanks, and finally, how do I get the aSvgData? > > > Just load your file into that - this RenderGraphic just wants a > const sal_uInt8* ptr with the utf-8 encoded xml stream. ;) > > Cheers, > > -- Thorsten > Sorry s

Re: Question: How do I rasterize an SVG to a BitmapEx

2012-02-27 Thread Thorsten Behrens
Andrew Higginson wrote: > Thanks, and finally, how do I get the aSvgData? > Just load your file into that - this RenderGraphic just wants a const sal_uInt8* ptr with the utf-8 encoded xml stream. ;) Cheers, -- Thorsten pgpMWjjjB12TW.pgp Description: PGP signature __

Re: Question: How do I rasterize an SVG to a BitmapEx

2012-02-27 Thread Andrew Higginson
Hi, > const ::vcl::RenderGraphicRasterizer aRaster( > "image/svg+xml", > aSvgData.getLength(), > aSvgData.getConstArray() ); > > BitmapEx aBmpEx = aRaster.Rasterize( Size(200,300) ); > > Thanks, and finally, how do I get the aSvgData? -- Andrew Higginson _

Re: Question: How do I rasterize an SVG to a BitmapEx

2012-02-27 Thread Thorsten Behrens
Andrew Higginson wrote: > I can see there are various classes (i.e. vcl::SVGReader and > vcl::RenderGraphicRasterizer) which may do the job, however I need to > rasterize it to a specific resolution (pretty much what > vcl::RenderGraphicRasterizer::Rasterize does) however I don't want to > duplicat

Question: How do I rasterize an SVG to a BitmapEx

2012-02-25 Thread Andrew Higginson
Hi, I am trying to do some work on improving the About Dialog and I need to be able to rasterize an SVG (which I guess I would have to pack in the icon themes) to a vcl::BitmapEx I can see there are various classes (i.e. vcl::SVGReader and vcl::RenderGraphicRasterizer) which may do the job, howev