Exemple #1
0
        public static Outline DecomposeGlyph(FT.FT_GlyphSlotRec slot, float scale, int isteps)
        {
            Outline outline = new Outline(isteps);

            if (odecomposer == null)
            {
                odecomposer = new OutlineDecomposer(scale);
            }

            lock (odecomposer)
            {
                odecomposer.scale = scale;

                odecomposer.LineToEv  = outline.LineTo;
                odecomposer.MoveToEv  = outline.MoveTo;
                odecomposer.ConicToEv = outline.ConicTo;
                odecomposer.CubicToEv = outline.CubicTo;

                odecomposer.Decompose(slot);
            }

            return(outline);
        }
Exemple #2
0
        public static Outline DecomposeGlyph(IntPtr glyph, float scale, int isteps)
        {
            Outline outline = new Outline(isteps);

            if (odecomposer == null)
            {
                odecomposer = new OutlineDecomposer(scale);
            }

            lock (odecomposer)
            {
                odecomposer.scale = scale;

                odecomposer.LineToEv  = outline.LineTo;
                odecomposer.MoveToEv  = outline.MoveTo;
                odecomposer.ConicToEv = outline.ConicTo;
                odecomposer.CubicToEv = outline.CubicTo;

                odecomposer.Decompose(glyph);
            }

            return(outline);
        }
Exemple #3
0
        public static Outline DecomposeGlyph(IntPtr glyph, float scale, int isteps)
        {
            Outline outline = new Outline(isteps);

            if (odecomposer == null)
            {
                odecomposer = new OutlineDecomposer(scale);
            }

            lock (odecomposer)
            {
                odecomposer.scale = scale;

                odecomposer.LineToEv = outline.LineTo;
                odecomposer.MoveToEv = outline.MoveTo;
                odecomposer.ConicToEv = outline.ConicTo;
                odecomposer.CubicToEv = outline.CubicTo;

                odecomposer.Decompose(glyph);
            }

            return outline;
        }