/// <summary>
        /// Transform a rectangle with all matrices with potential animation phases.
        /// </summary>
        /// <param name="r"></param>
        /// <param name="phaseY"></param>
        public SKRect RectToPixelPhaseHorizontal(SKRect r, float phaseY)
        {
            // multiply the height of the rect with the phase
            r.Left  *= phaseY;
            r.Right *= phaseY;

            return(MatrixOffset.MapRect(ViewPortHandler.touchMatrix
                                        .MapRect(MatrixValueToPx.MapRect(r))));
        }
        /// <summary>
        /// Transform a rectangle with all matrices with potential animation phases.
        /// </summary>
        /// <param name="r"></param>
        /// <param name="phaseY"></param>
        public SKRect RectToPixelPhase(SKRect r, float phaseY)
        {
            // multiply the height of the rect with the phase
            r.Top    *= phaseY;
            r.Bottom *= phaseY;

            return(MatrixOffset.MapRect(ViewPortHandler.touchMatrix
                                        .MapRect(MatrixValueToPx.MapRect(r))));
        }
Esempio n. 3
0
 /// <summary>
 /// Transform a rectangle with all matrices.
 /// </summary>
 /// <param name="r"></param>
 public void RectValueToPixel(RectF r)
 {
     MatrixValueToPx.MapRect(r);
     ViewPortHandler.touchMatrix.MapRect(r);
     MatrixOffset.MapRect(r);
 }
 /// <summary>
 /// Transform a rectangle with all matrices.
 /// </summary>
 /// <param name="r"></param>
 public SKRect RectValueToPixel(SKRect r)
 {
     r = MatrixValueToPx.MapRect(r);
     r = ViewPortHandler.touchMatrix.MapRect(r);
     return(MatrixOffset.MapRect(r));
 }