Пример #1
0
        public Layer pushPhysicalShape(Path path, float elevation, Color color, Color shadowColor, Clip clipBehavior)
        {
            var layer = new PhysicalShapeLayer(clipBehavior);

            layer.path             = path;
            layer.elevation        = elevation;
            layer.color            = color;
            layer.shadowColor      = shadowColor;
            layer.devicePixelRatio = Window.instance.devicePixelRatio;

            this._pushLayer(layer);
            return(layer);
        }
Пример #2
0
        public NativeEngineLayer PushPhysicalShape(
            Path path,
            double elevation,
            int color,
            int shadowColor,
            int clipBehavior)
        {
            SKPath sk_path       = path;
            var    clip_behavior = (Flow.Layers.Clip)clipBehavior;
            var    layer         = new PhysicalShapeLayer(clip_behavior);

            layer.set_path(sk_path);
            layer.set_elevation((float)elevation);
            layer.set_color((uint)color);
            layer.set_shadow_color((uint)shadowColor);

            // TODO: Pixel Ratio
            //layer.set_device_pixel_ratio(UIDartState::Current()->window()->viewport_metrics().device_pixel_ratio);

            PushLayer(layer);
            return(NativeEngineLayer.MakeRetained(layer));
        }
Пример #3
0
        public void drawShadow(Path path, Color color, float elevation, bool transparentOccluder)
        {
            float dpr = Window.instance.devicePixelRatio;

            PhysicalShapeLayer.drawShadow(this, path, color, elevation, transparentOccluder, dpr);
        }