@ -116,23 +116,23 @@ namespace TheGameExtreme.view
touchDictionary . Values . CopyTo ( infos , 0 ) ;
SKMatrix touchMatrix = SKMatrix . MakeIdentity ( ) ;
if ( infos . Length = = 1 )
{
//if (infos.Length == 1 )
// {
SKPoint prevPoint = infos [ 0 ] . PreviousPoint ;
SKPoint newPoint = infos [ 0 ] . NewPoint ;
SKPoint pivotPoint = Matrix . MapPoint ( textPaint . MeasureText ( Value ) / 2 , textPaint . TextSize / 2 ) ;
touchMatrix = TouchManager . OneFingerManipulate ( prevPoint , newPoint , pivotPoint ) ;
}
else if ( infos . Length > = 2 )
{
int pivotIndex = infos [ 0 ] . NewPoint = = infos [ 0 ] . PreviousPoint ? 0 : 1 ;
SKPoint pivotPoint = infos [ pivotIndex ] . NewPoint ;
SKPoint newPoint = infos [ 1 - pivotIndex ] . NewPoint ;
SKPoint prevPoint = infos [ 1 - pivotIndex ] . PreviousPoint ;
// }
//else if (infos.Length >= 2 )
// {
// int pivotIndex = infos[0].NewPoint == infos[0].PreviousPoint ? 0 : 1;
// SKPoint pivotPoint = infos[pivotIndex].NewPoint;
// SKPoint newPoint = infos[1 - pivotIndex].NewPoint;
// SKPoint prevPoint = infos[1 - pivotIndex].PreviousPoint;
touchMatrix = TouchManager . TwoFingerManipulate ( prevPoint , newPoint , pivotPoint ) ;
}
// touchMatrix = TouchManager.TwoFingerManipulate(prevPoint, newPoint, pivotPoint);
// }
SKMatrix matrix = Matrix ;
SKMatrix . PostConcat ( ref matrix , touchMatrix ) ;