Example #1
0
 public void BeginRead(int countourCount)
 {
     //-----------------------------------
     contours = new List <GlyphContour>();
     //start with blank contour
     cntBuilder = new GlyphContourBuilder();
 }
Example #2
0
        public static Msdfgen.Shape CreateMsdfShape(GlyphContourBuilder glyphToContour, float pxScale)
        {
            List <GlyphContour> cnts           = glyphToContour.GetContours();
            List <GlyphContour> newFitContours = new List <GlyphContour>();
            int j = cnts.Count;

            for (int i = 0; i < j; ++i)
            {
                newFitContours.Add(
                    CreateFitContour(
                        cnts[i], pxScale, false, true));
            }
            return(CreateMsdfShape(newFitContours));
        }
Example #3
0
        //---------------------------------------------------------------------

        public static GlyphImage CreateMsdfImage(
            GlyphContourBuilder glyphToContour, MsdfGenParams genParams)
        {
            // create msdf shape , then convert to actual image
            return(CreateMsdfImage(CreateMsdfShape(glyphToContour, genParams.shapeScale), genParams));
        }