Exemplo n.º 1
0
 public TransformedGeometryImpl(GeometryImpl source, Matrix transform)
 {
     SourceGeometry = source;
     Transform      = transform;
     EffectivePath  = source.EffectivePath.Clone();
     EffectivePath.Transform(transform.ToSKMatrix());
 }
        /// <summary>
        ///  Initializes a new instance of the <see cref="TransformedGeometryImpl"/> class.
        /// </summary>
        /// <param name="source">Source geometry.</param>
        /// <param name="transform">Transform of new geometry.</param>
        public TransformedGeometryImpl(GeometryImpl source, Matrix transform)
        {
            SourceGeometry = source;
            Transform      = transform;

            var transformedPath = source.EffectivePath.Clone();

            transformedPath.Transform(transform.ToSKMatrix());

            EffectivePath = transformedPath;
            Bounds        = transformedPath.TightBounds.ToAvaloniaRect();
        }