Drawing simple shapes

Oystein Bjorke 6 ár síðan 0
This discussion was imported from CodePlex

amity2001 wrote at 2012-10-03 11:01:

Hello world,

Is there any way to draw simple shapes like circle, ellipse, square, rectangle, etc. on Oxyplot,

without calculating data points for series.

Like in C# there are few direct methods to draw these shapes, is it possible in Oxyplot by directly giving appropriate parameters like radius, center of circle, etc.

Thanks in advance.

objo wrote at 2012-10-03 19:11:

Use 'annotations' to draw content that should not be listed in the 'legend box'. There are implementations for rectangles and lines, but not ellipses. You could derive an "EllipsisAnnotation" in the same way as LineAnnotation - calculate the points and call DrawClippedLine. IRenderContext does not support clipping of ellipses. I did not include clipping in IRenderContext to make it easier to port to different platforms...