コード例 #1
0
        ///<summary>
        /// Converts text rendered in the given <see cref="Font"/> and pointsize to a <see cref="IGeometry"/> using a standard flatness factor.
        /// </summary>
        /// <param name="text">The text to render</param>
        /// <param name="font">The <see cref="FontFamily"/></param>
        /// <param name="size">The size to render at</param>
        /// <param name="style">The style to use</param>
        /// <param name="flatness">The flatness to use</param>
        /// <param name="origin">The point to start</param>
        /// <param name="stringFormat">The string format to use</param>
        /// <param name="geomFact">The geometry factory to use to create the result</param>
        /// <returns>A polygonal geometry representing the rendered text</returns>
        public static IGeometry Read(string text, FontFamily font, FontStyle style, float size, PointF origin, StringFormat stringFormat, double flatness, IGeometryFactory geomFact)
        {
            var path = new GraphicsPath();

            path.AddString(text, font, (int)style, size, origin, stringFormat);
            return(GraphicsPathReader.Read(path, flatness, geomFact));
        }
コード例 #2
0
 ///<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(GraphicsPathIterator pathIt, IGeometryFactory geomFact)
 {
     var pc = new GraphicsPathReader(geomFact);
     return pc.Read(pathIt);
 }
コード例 #3
0
        ///<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(GraphicsPathIterator pathIt, IGeometryFactory geomFact)
        {
            var pc = new GraphicsPathReader(geomFact);

            return(pc.Read(pathIt));
        }