Ejemplo n.º 1
0
        async Task Test(string directory, string file, string latex)
        {
            var source = new TaskCompletionSource <UIKit.UIImage>();

            Foundation.NSRunLoop.Main.BeginInvokeOnMainThread(() => {
                try {
                    using var v = IosMathLabels.MathView(latex, 50);
                    var size    = v.SizeThatFits(default);
Ejemplo n.º 2
0
        public override void ViewDidLoad()
        {
            View.BackgroundColor = UIColor.White;
            var latexView = IosMathLabels.MathView(Rendering.Tests.MathData.IntegralColorBoxCorrect, 50); // WJWJWJ latex here

            latexView.ContentInsets = new UIEdgeInsets(10, 10, 10, 10);
            var size = latexView.SizeThatFits(new CoreGraphics.CGSize(370, 280));

            latexView.Frame = new CoreGraphics.CGRect(0, 40, size.Width, size.Height);
            View.Add(latexView);
        }
Ejemplo n.º 3
0
        public override void ViewDidLoad()
        {
            View.BackgroundColor = UIColor.White;
            var latexView = IosMathLabels.MathView(SkiaSharp.MathData.RadicalNestedDeep, 50); // WJWJWJ latex here

            latexView.ContentInsets = new UIEdgeInsets(10, 10, 10, 10);
            var size = latexView.SizeThatFits(new CoreGraphics.CGSize(370, 280));

            latexView.Frame = new CoreGraphics.CGRect(0, 40, size.Width, size.Height);
            View.Add(latexView);
        }
Ejemplo n.º 4
0
        public override void ViewDidLoad()
        {
            var scrollView = new UIScrollView {
                BackgroundColor = UIColor.White, ScrollEnabled = true
            };

            System.nfloat y = 0, w = 0;
            foreach (var latex in Rendering.Tests.TestRenderingMathData.AllConstants.Values)
            {
                var latexView = IosMathLabels.MathView(latex, 50); // WJWJWJ latex here
                var size      = latexView.SizeThatFits(new CoreGraphics.CGSize(370, 280));
                latexView.Frame = new CoreGraphics.CGRect(0, y, size.Width, size.Height);
                scrollView.Add(latexView);
                y += size.Height;
                w  = size.Width > w ? size.Width : w;
                y += 10;
            }
            scrollView.ContentSize = new CoreGraphics.CGSize(w, y);
            View = scrollView;
        }