Best way to render a Geometry on the ViewXY?

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

ThomasH_BR
Posts: 1
Joined: Thu Apr 20, 2017 1:53 am

Best way to render a Geometry on the ViewXY?

Post by ThomasH_BR » Thu Apr 20, 2017 1:57 am

What's the best way to render a System.Windows.Media.Geometry object to the chart? I'm currently converting to a PathGeometry and creating a Polygon out of many calls to PathGeometry.GetPointAtFractionLength(...). It works but seems pretty slow. Is there better or simpler way?

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Best way to render a Geometry on the ViewXY?

Post by ArctionPasi » Thu Apr 20, 2017 12:54 pm

Hi!

We unfortunately don't know internal implementation of Geometry or PathGeometry. There might be some helper routines to extract different paths separately and access their binary data, which you could utilize to compose a PolygonSeries or FreeFormPointLineSeries points array.

I don't know how well it suits your purpose, but I think there's a way to write Geometry in a Bitmap image. You can show that bitmap image in many LC objects, as point symbol, or as fill.
LightningChart Support Team, PT