public void Text(string text) { if (IsPenDown) { Wait(); FormattedText ft = new FormattedText(text, CultureInfo.CurrentCulture, FlowDirection.LeftToRight, Font, FontSize, new SolidColorBrush(Color.FromRgb(Color.R, Color.G, Color.B)), VisualTreeHelper.GetDpi(this).PixelsPerDip); DrawText dt = new DrawText(); dt.Angle = Heading; dt.Text = ft; dt.Position = new Point(X, Y); currentShape.Add(new DrawGeometry(dt)); Unlock(); InvalidateVisual(); } }
public DrawGeometry(DrawText text) { Text = text; Type = DrawType.Text; }