This project has moved and is read-only. For the latest updates, please go here.

Scaling with GDI+ Renderer

Topics: WPF and GDI+ Renderers
Jun 27, 2011 at 12:12 PM
I'm currently trying to draw a SVG image scaled to a Bitmap.
However, the image is not scaled but cropped after I resize my

SvgPictureBoxWindow. Could you tell me what would be the correct way of going about this? Thanks in advance.

> svgRenderer = new GdiGraphicsRenderer();
> svgWindow = new SvgPictureBoxWindow(100, 100, svgRenderer);
> svgWindow.Source = Environment.CurrentDirectory + "\\" + url;
> svgRenderer.Render(svgWindow.Document as SvgDocument);
> BaseImage = svgRenderer.RasterImage;
Coordinator
Jun 29, 2011 at 2:55 AM

Hello Frank,

Sorry for the delay, trying to get something else up and running will get back to you tomorrow.

Best regards,
Paul. 

Coordinator
Jun 30, 2011 at 3:50 PM

Hello Frank,

Sorry for the delay, I have looked at it and there seems to be no problem.

Please take a look at the GdiTestSvgControl sample.
Just run it, drag and drop an SVG file into the window and resize the window.
Is that not the behavior you are looking for?

Best regards,
Paul. 

 

Jul 14, 2011 at 10:03 AM
Hi Paul,

Apologies for my late reply, I just got back from vacation. I checked the sample and that does indeed the behaviour I'd like to mimick, so thanks for your help!

Kind regards,
Frank Razenberg

On 30/06/2011 16:50, SelormeyPaul wrote:

From: SelormeyPaul

Hello Frank,

Sorry for the delay, I have looked at it and there seems to be no problem.

Please take a look at the GdiTestSvgControl sample.
Just run it, drag and drop an SVG file into the window and resize the window.
Is that not the behavior you are looking for?

Best regards,
Paul.