Esempio n. 1
0
        public override Box CreateBox(TexStyle style)
        {
            // Create box for base atom, in cramped style.
            var baseBox = BaseAtom == null ? StrutBox.Empty : BaseAtom.CreateBox(TexUtility.GetCrampedStyle(style));

            // Create result box.
            var defaultLineThickness = TEXConfiguration.main.LineThickness * TexUtility.SizeFactor(style);
            var resultBox            = OverBar.Get(baseBox, 3 * defaultLineThickness, defaultLineThickness);

            // Adjust height and depth of result box.
            resultBox.height = baseBox.height + 5 * defaultLineThickness;
            resultBox.depth  = baseBox.depth;

            return(resultBox);
        }
Esempio n. 2
0
        public override Box CreateBox()
        {
            // Create box for base atom, in cramped style.
            TexContext.Environment.Push(TexUtility.GetCrampedStyle());
            var baseBox = BaseAtom == null ? StrutBox.Empty : BaseAtom.CreateBox();

            TexContext.Environment.Pop();

            // Create result box.
            var defaultLineThickness = TEXConfiguration.main.LineThickness * TexContext.Scale;
            var resultBox            = OverBar.Get(baseBox, 3 * defaultLineThickness, defaultLineThickness);

            // Adjust height and depth of result box.
            resultBox.height = baseBox.height + 5 * defaultLineThickness;
            resultBox.depth  = baseBox.depth;

            return(resultBox);
        }