Exemplo n.º 1
0
        public static void Run(Type1BuildCharContext context)
        {
            var deltaX = context.Stack.PopBottom();

            if (context.IsFlexing)
            {
                // not in the Type 1 spec, but exists in some fonts
                context.AddFlexPoint(new PdfPoint(deltaX, 0));
            }
            else
            {
                var x = context.CurrentPosition.X + deltaX;
                var y = context.CurrentPosition.Y;
                context.CurrentPosition = new PdfPoint(x, y);
                context.Path.MoveTo(x, y);
            }

            context.Stack.Clear();
        }
Exemplo n.º 2
0
        public static void Run(Type1BuildCharContext context)
        {
            var deltaX = context.Stack.PopBottom();
            var deltaY = context.Stack.PopBottom();

            if (context.IsFlexing)
            {
                context.AddFlexPoint(new PdfPoint(deltaX, deltaY));
            }
            else
            {
                var x = context.CurrentPosition.X + deltaX;
                var y = context.CurrentPosition.Y + deltaY;
                context.CurrentPosition = new PdfPoint(x, y);
                context.Path.MoveTo(x, y);
            }

            context.Stack.Clear();
        }