Esempio n. 1
0
        public override void DrawEquation(DrawingContext dc)
        {
            base.DrawEquation(dc);
            charFt.DrawTextLeftAligned(dc, Location);
            int           done = 0;
            double        left = Left;
            double        hCenter;
            FormattedText ft   = null;
            string        text = "";
            int           count;

            for (int i = 0; i < decorations.Count; i++)
            {
                //var item = decorations[i];
                //var charFt = textManager.GetFormattedText(character, 0);
                //double decoWidth = 0; //;GetDecoratedCharWidth(charFt, item.ToList(), i, out hCenter);
                //count = item.Key - done;
                //if (count > 0)
                //{
                //    text = textData.ToString(done, count);
                //    ft = textManager.GetFormattedText(text, formats.Skip(done).Take(count).ToList());
                //    ft.DrawTextLeftAligned(dc, new Point(left, Top));
                //    done += ft.Text.Length;
                //    left += ft.GetFullWidth() + ft.OverhangTrailing;
                //}
                //hCenter -= charFt.OverhangTrailing;
                //if (item.Key > 0)
                //{
                //    hCenter += charFt.OverhangLeading;
                //}
                //dc.DrawLine(new Pen(Brushes.Blue, 1), new Point(left + hCenter, Top), new Point(left + hCenter, Bottom));
                //dc.DrawLine(new Pen(Brushes.Red, 1), new Point(left, Top), new Point(left, Bottom));
                //charFt.DrawTextCenterAligned(dc, new Point(left + hCenter, Top));
                ////DrawDecorations(dc, item.ToList(), charFt, i, left + hCenter);
                ////DrawRightDecorations(dc, item.ToList(), left + charFt.GetRight() - (item.Key > 0 ? 0 : charFt.OverhangLeading), formats[i]);
                ////DrawLeftDecorations(dc, item.ToList(), left, formats[i]);
                ////DrawFaceDecorations(dc, charFt, item.ToList(), hCenter);
                ////DrawTopDecorations(dc, charFt, item.ToList(), hCenter, formats[i]);
                ////DrawBottomDecorations(dc, charFt, item.ToList(), hCenter, formats[i]);
                //left += decoWidth + charFt.OverhangTrailing + charFt.OverhangLeading;
                //done++;
            }
        }