views:

8

answers:

0

I have built a WPF application that does some OCR type stuff on graphics objects from XPS documents. I want to port it to Silverlight (out of browser app) so it can run on Macs, not just Windows. I can open and display XPS documents in a Silverlight (SL) app quite nicely.

My problem is that so much of the useful graphics library is missing from SL, and I'm not sure if there are other ways to do what I need.

Is it possible to: - Reference a Mono dll from a SL app (for OCR operations on bitmap renderings of XPS graphics, or to use SL as the presentation layer and other Mono dlls for logic), - Get the Bounds rectangle of a rendered SL Path or Glyph?

I can probably calculate the rendered bounds of a Path myself from its geometry points and StrokeThickness, but that wouldn't be ideal. I can't find the bounds of a glyph; the Glyphs.ActualWidth is close, but ActualHeight is quite unrelated to the actual render bounds of a character on the screen.

I have the feeling that the only way to use Mono dlls in my app would be for the SL app to communicate with them through a web service running on the local machine (if this works at all) which is quite awkward.

Is there another way to work with XAML vector graphics on Windows and Mac?

Thanks for your time, Andrew