Ejemplo n.º 1
0
        protected virtual void OnChildTouched(VisualElement view)
        {
            // TODO: validate location
            // ...

            var viewRenderer = DoodlePlatform.GetDoodleRenderer(view);

            viewRenderer.Touch();
        }
Ejemplo n.º 2
0
        public void Redraw(SkiaSharp.SKSurface surface)
        {
            for (var i = 0; i < ElementController.LogicalChildren.Count; i++)
            {
                var child = ElementController.LogicalChildren[i] as VisualElement;
                if (child != null)
                {
                    OnChildRedraw(child, surface);

                    // update logical children
                    var viewRenderer = DoodlePlatform.GetDoodleRenderer(child);
                    viewRenderer.Packager.Redraw(surface);
                }
            }
        }
Ejemplo n.º 3
0
        public void Touch(VisualElement view)
        {
            for (var i = 0; i < ElementController.LogicalChildren.Count; i++)
            {
                var child = ElementController.LogicalChildren[i] as VisualElement;
                if (child != null)
                {
                    OnChildTouched(child);

                    var viewRenderer = DoodlePlatform.GetDoodleRenderer(child);
                    viewRenderer.Packager.Touch(child);
                }
            }

            // TODO: force redraw for the whole view in any case
            // ...
        }
        public static UIViewController CreateViewController(this Page page)
        {
            if (!Forms.IsInitialized)
            {
                throw new InvalidOperationException("call Forms.Init() before this");
            }

            if (!(page.RealParent is Application))
            {
                Application app = new DefaultApplication();
                app.MainPage = page;
            }

            var result = new Platform.iOS.Doodle.DoodlePlatform();

            //var result = new Platform.iOS.Doodle.Platform();
            result.SetPage(page);
            return(result.ViewController);
        }
Ejemplo n.º 5
0
 public DoodlePlatformRenderer(DoodlePlatform platform)
 {
     Platform = platform;
 }
Ejemplo n.º 6
0
        protected virtual void OnChildRedraw(VisualElement view, SkiaSharp.SKSurface surface)
        {
            var viewRenderer = DoodlePlatform.GetDoodleRenderer(view);

            viewRenderer.DrawView(surface);
        }
Ejemplo n.º 7
0
        protected virtual void OnChildAdded(VisualElement view)
        {
            var viewRenderer = DoodlePlatform.CreateDoodleRenderer(view);

            DoodlePlatform.SetDoodleRenderer(view, viewRenderer);
        }