private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e) { border.Background = redBrush; initialAngle = transform.Rotation; initialScale = transform.ScaleX; }
private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e) { initialAngle = transform.Rotation; initialScale = transform.ScaleX; //flickData.Text = string.Format(" OnPinchStarted: Angle = {0}, Distance = {1}", // Math.Round(e.Angle), e.Distance); }
private void BeginTextZoom(object sender, PinchStartedGestureEventArgs e) { // allow only horizontal pinches var angle = Math.Abs(e.Angle); _allowZoom = ((angle >= 80) && (angle <= 100)) || ((angle <= 290) && (angle >= 250)); }
private void EditorImage_PinchStarted(object sender, PinchStartedGestureEventArgs e) { if (this.selectedMode == MODE_SCROLL) { e.Handled = true; this.initialScale = this.currentScale; } }
private void gesture_PinchStarted(object sender, PinchStartedGestureEventArgs e) { var point = e.GetPosition(ContentPanel, 0); var point2 = e.GetPosition(ContentPanel, 1); message.Text = string.Format("pinch started at ({0},{1}) and ({1},{2}) with angle {3} and distance {4}", point.X, point.Y, point2.X, point2.Y, e.Angle, e.Distance); flickMessage.Text = null; }
private void GestureListener_PinchStarted(object sender, PinchStartedGestureEventArgs e) { // Store the initial rotation angle and scaling InitialScale = ImageTransformation.ScaleX; // Calculate the center for the zooming Point firstTouch = e.GetPosition(photo, 0); Point secondTouch = e.GetPosition(photo, 1); Center = new Point(firstTouch.X + (secondTouch.X - firstTouch.X) / 2.0, firstTouch.Y + (secondTouch.Y - firstTouch.Y) / 2.0); }
private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e) { if (isAnimating) { return; } oldFinger1 = e.GetPosition(_content, 0); oldFinger2 = e.GetPosition(_content, 1); oldScaleFactor = 1; e.Handled = true; }
void gl_PinchStarted(object sender, PinchStartedGestureEventArgs e) { _initialScale = scale.ScaleX; // calculate the center for the zooming Point firstTouch = e.GetPosition(gameGrid, 0); Point secondTouch = e.GetPosition(gameGrid, 1); Point center = new Point(firstTouch.X + (secondTouch.X - firstTouch.X) / 2.0, firstTouch.Y + (secondTouch.Y - firstTouch.Y) / 2.0); scale.CenterX = center.X; scale.CenterY = center.Y; //UpdateLayout(); }
private void GestureListener_PinchStarted(object sender, PinchStartedGestureEventArgs e) { // store the initial rotation angle and scaling initialScale = ImageTransformation.ScaleX; // calculate the center for the zooming Point firstTouch = e.GetPosition(DetailImage, 0); Point secondTouch = e.GetPosition(DetailImage, 1); double centerX = firstTouch.X + (secondTouch.X - firstTouch.X) / 2.0; double centerY = firstTouch.Y + (secondTouch.Y - firstTouch.Y) / 2.0; center = new Point(centerX, centerY); _oldFinger1 = e.GetPosition(DetailImage, 0); _oldFinger2 = e.GetPosition(DetailImage, 1); _oldScaleFactor = 1; }
private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e) { if (!CanZoom) { return; } var img = sender as FrameworkElement; var transform = img.RenderTransform as CompositeTransform; _old.CenterX = transform.CenterX; _old.CenterY = transform.CenterY; _old.TranslateX = transform.TranslateX; _old.TranslateY = transform.TranslateY; _old.ScaleX = transform.ScaleX; _old.ScaleY = transform.ScaleY; _initialScale = transform.ScaleX; }
private void OnGestureListenerPinchStarted(object sender, PinchStartedGestureEventArgs args) { _isPinching = args.OriginalSource == image; if (_isPinching) { // Set transform centers Point ptPinchCenter = args.GetPosition(image); ptPinchCenter = previousTransform.Transform(ptPinchCenter); scaleTransform.CenterX = ptPinchCenter.X; scaleTransform.CenterY = ptPinchCenter.Y; rotateTransform.CenterX = ptPinchCenter.X; rotateTransform.CenterY = ptPinchCenter.Y; _ptPinchPositionStart = args.GetPosition(this); } }
private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e) { _initialAngle = MyMustacheTransformation.Rotation; _initialScale = MyMustacheTransformation.ScaleX; }
private void OnPinchStarted(object s, PinchStartedGestureEventArgs e) { _fingerOne = e.GetPosition(MyImage, 0); _fingerTwo = e.GetPosition(MyImage, 1); _previousScale = 1; }
/*ピンチアウトする前にサイズを保存しておきます、コメントアウトを外すと回転もできます。*/ private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e) { //initialAngle = transform.Rotation; initialScale = transform.ScaleX; }
private void GestureListener_PinchStarted(object sender, PinchStartedGestureEventArgs e) { ReportGesture("Pinch Started"); }
private void GestureListener_PinchStarted(object sender, PinchStartedGestureEventArgs e) { _oldFinger1 = e.GetPosition(MapImage, 0); _oldFinger2 = e.GetPosition(MapImage, 1); _oldScaleFactor = 1; }
private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e) { initialScale = transform.ScaleX; }
/// <summary> /// Initializes the zooming operation /// </summary> private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e) { _oldFinger1 = e.GetPosition(CameraImage, 0); _oldFinger2 = e.GetPosition(CameraImage, 1); _oldScaleFactor = 1; }
private void OnGestureListenerPinchStarted(object sender, PinchStartedGestureEventArgs args) { this.initialScale = this.transform.ScaleX; this.transform.CenterX = this.MyImage.ActualWidth / 2.0; this.transform.CenterY = this.MyImage.ActualHeight / 2.0; }
// I don't think there's a simpler way to disable panning on a map // rolling out an EventToCommand behavior seems a bit much private void GestureListener_PinchStarted(object sender, PinchStartedGestureEventArgs e) { oldZoom = Zoom; }
private void OnLayoutPinchStarted(object sender, PinchStartedGestureEventArgs e) { this._measurePinch = true; PageManager.IgnoreInteractions = true; }