views:

644

answers:

1

I have a video camera that I'm interfacing with a C# app. The camera actually comes with a .NET WinForms control. It supports drawing on it with GDI+ functions.

When I zoom in, I need <1 pixel accuracy i.e. I want to draw a circle with a radius of less than two pixels. How can I draw vector graphics in WinForms? Is my best bet to overlay a WPF Canvas? I know I can use WPF controls in WinForm apps, but is it possible to make the background of a ElementHost/WPF canvas transparent and overlay it onto my video feed? Am I better off creating a WPF app, and only using this video control on the WindowsFormsHost provider?

Any other solutions of drawing vector graphics in C# apps?

Thanks in advance.

+2  A: 

Well, unfortunately you won't be able to use WPF to overlay anything on your WinForms control due to airspace issues. Winforms and WPF content is not allowed to overlap inside the same window. You're stuck using vanilla GDI or another custom Winforms vector library.

MSDN Link to explanation of interoperability issues.

Alex
I think you may have saved me a lot of time. Thanks.
JP