public static IGeometry Read(string text, Typeface font, double size, Point origin, FlowDirection flowDirection, IGeometryFactory geomFact) { var formattedText = new FormattedText(text, System.Globalization.CultureInfo.CurrentUICulture, flowDirection, font, size, Brushes.Black); var geom = formattedText.BuildGeometry(origin); return(WpfGeometryReader.Read(geom.GetFlattenedPathGeometry(FlatnessFactor, ToleranceType.Relative), geomFact)); }
///<summary> /// Converts a flat path to a <see cref="IGeometry"/>. ///</summary> /// <param name="pathIt">The path to convert</param> /// <param name="geomFact">The GeometryFactory to use</param> /// <returns>A Geometry representing the path</returns> public static IGeometry Read(WpfGeometry pathIt, IGeometryFactory geomFact) { var pc = new WpfGeometryReader(geomFact); return(pc.Read(pathIt)); }
///<summary> /// Converts a flat path to a <see cref="IGeometry"/>. ///</summary> /// <param name="pathIt">The path to convert</param> /// <param name="geomFact">The GeometryFactory to use</param> /// <returns>A Geometry representing the path</returns> public static IGeometry Read(WpfGeometry pathIt, IGeometryFactory geomFact) { var pc = new WpfGeometryReader(geomFact); return pc.Read(pathIt); }