Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }