Exemplo n.º 1
0
        private void TransformChanged(object sender, EventArgs e)
        {
            var transform = ((Transform)sender)?.Value;

            if (_platformImpl is ITransformedGeometryImpl t)
            {
                if (transform == null || transform == Matrix.Identity)
                {
                    _platformImpl = t.SourceGeometry;
                }
                else if (transform != t.Transform)
                {
                    _platformImpl = t.SourceGeometry.WithTransform(transform.Value);
                }
            }
            else if (_platformImpl != null && transform != null && transform != Matrix.Identity)
            {
                _platformImpl = PlatformImpl.WithTransform(transform.Value);
            }

            Changed?.Invoke(this, EventArgs.Empty);
        }
Exemplo n.º 2
0
        private void TransformChanged(AvaloniaPropertyChangedEventArgs e)
        {
            var transform = (Transform)e.NewValue;

            PlatformImpl = PlatformImpl.WithTransform(transform.Value);
        }