public hText(wTextObject WindText) { Text = WindText.Text.Text; Font = WindText.Text.Font; Origin = WindText.Plane.Origin; Angle = WindText.Angle; HorizontalAlignment = (hAlign)WindText.Text.Font.HorizontalAlignment; VerticalAlignment = (vAlign)WindText.Text.Font.VerticalAlignment; FontItalic = (fStyle)Convert.ToInt32(WindText.Text.Font.IsItalic); FontBold = (fWeight)Convert.ToInt32(WindText.Text.Font.IsBold); }
public Path WpfText(wCurve Shp, wGraphic Graphics, wEffects ShapeEffects) { Path X = new Path(); wTextObject Z = (wTextObject)Shp; wText Y = Z.Text; wFontMedia F = Y.Font.ToMediaFont(); FormattedText T = new FormattedText("Test", CultureInfo.GetCultureInfo("en-us"), FlowDirection.LeftToRight, new Typeface("Arial"), 24, new SolidColorBrush(Colors.Black)); //FormattedText T = new FormattedText(Y.Text,CultureInfo.GetCultureInfo("en-us"),FlowDirection.LeftToRight, F.GetTypeFace(),F.Size, Graphics.WpfFill); X.Data = T.BuildGeometry(new System.Windows.Point(Z.Plane.Origin.X, Z.Plane.Origin.Y)); X.RenderTransform = Xform; //X = SetPathFill(X, Graphics); //X = SetPathEffects(X, ShapeEffects); //X = SetPathStroke(X, Graphics); group.Shapes.Add(new wShape(Shp, Graphics)); return(X); }