Steps to reproduce
The PointAnnotation works under 2.0 but I it doesn't work under 2.1
For example,
public void Annotation(MarkerType shape, OxyColor color, double size, string text, DataPoint position)
{
var annotation = new PointAnnotation
{
Shape = shape,
Text = text,
TextColor = color,
TextHorizontalAlignment = HorizontalAlignment.Center,
TextVerticalAlignment = VerticalAlignment.Middle,
TextMargin = 0,
TextPosition = position,
FontWeight = FontWeights.Bold,
Fill = OxyColors.Transparent,
Stroke = SetTransparency(200, color),
StrokeThickness = 2,
Size = size,
X = position.X,
Y = position.Y
};
Model.Annotations.Add(annotation);
}
To Test it , call
Annotation(MarkerType.Circle, OxyColors.RoyalBlue, 8, "D", new DataPoint(60, 60));
Platform:
.Net 6.0 and WinUI
Expected behaviour
I expected to see a Circle Marker with Letter D inside. However, I only see a Circle with No Text.
If I export it as below , the pdf is correct
public static void ExportToPDF(this PlotModel model, Stream stream, float w = 1050, float h = 350)
{
OxyPlot.SkiaSharp.PdfExporter pdfExporter = new OxyPlot.SkiaSharp.PdfExporter { Width = w, Height = h };
stream.SetLength(0);
pdfExporter.Export(model, stream);
stream.Flush();
stream.Close();
}
see the rendered PDF through Skia which suggests the core library is be behaving as expected
TSCO.L.PDF
The output from WinUI
![Screenshot 2022-02-08 151819](https://user-images.githubusercontent.com/48822519/153178542-57b40f2f-038a-466e-8f2e-66c001226926.png)