/// <summary>
        /// Constructs a new PTransformActivity that animate between the source and destination
        /// matrices in the order specified by the mode, looping the given number of iterations.
        /// </summary>
        /// <param name="duration">The length of one loop of the activity.</param>
        /// <param name="stepInterval">
        /// The minimum number of milliseconds that this activity should delay between steps.
        /// </param>
        /// <param name="loopCount">
        /// The number of times the activity should reschedule itself.
        /// </param>
        /// <param name="mode">
        /// Defines how the activity interpolates between states.
        /// </param>
        /// <param name="aTarget">
        /// The object that the activity will be applied to and where the source
        /// state will be taken from.
        /// </param>
        /// <param name="aDestination">The destination matrix.</param>
        public PTransformActivity(long duration, long stepInterval, int loopCount, ActivityMode mode, Target aTarget, PMatrix aDestination) :
            base(duration, stepInterval, loopCount, mode)
        {
            //source = new float[6];
            //destination = new float[6];
            target = aTarget;
            //if (aDestination != null) {
            //	destination = aDestination.MatrixReference.Elements;
            //}

            source      = new PMatrix();
            destination = new PMatrix();
            destination.Multiply(aDestination);
        }
예제 #2
0
        /// <summary>
        /// Overridden.  See <see cref="PPaintContext.PushMatrix">PPaintContext.PushTransform</see>.
        /// </summary>
        public override void PushMatrix(PMatrix matrix)
        {
            if (matrix == null)
            {
                return;
            }
            RectangleF newLocalClip = matrix.InverseTransform(LocalClip);

            localClipStack.Push(newLocalClip);
            PMatrix newMatrix = (PMatrix)Transform.Clone();

            newMatrix.Multiply(matrix);
            transformStack.Push(newMatrix);

            SetWorldMatrix(newMatrix);
        }