public override bool ProcessMouseButtonUp(CanonicalMouseEventArgs e, InteractionContext context) { if (this.IsActive) { if (this.ValidForZoom) { Rectangle2D zoomRectangle = this.ZoomRectangle; Vector2D vector2D = this.TransformationProvider.ViewWindow.Center - zoomRectangle.Center; double num = System.Math.Min(this.TransformationProvider.ViewWindow.Width / zoomRectangle.Width, this.TransformationProvider.ViewWindow.Height / zoomRectangle.Height); this.TransformationProvider.PanView(vector2D.X, vector2D.Y); this.TransformationProvider.ViewScaling /= num; } this.Deactivate(); } return(this.IsActive); }
public override void Draw( PaintEventArgs e, GraphicsHelper graphicsHelper, InteractionContext context) { if (!this.rotateInteractor_0.IsActive || !(context.CanvasRectangle != Rectangle2D.Empty)) { return; } float rotationCircleRadius = this.rotateInteractor_0.GetRotationCircleRadius(context.CanvasRectangle.Size); using (Pen pen = new Pen((Color)RotateInteractor.RotationCircleColor)) { Point2D center = context.CanvasRectangle.Center; RectangleF rect = new RectangleF((float)center.X - rotationCircleRadius, (float)center.Y - rotationCircleRadius, 2f * rotationCircleRadius, 2f * rotationCircleRadius); e.Graphics.DrawArc(pen, rect, 0.0f, 6.283185f); } }
public override bool ProcessMouseWheel(CanonicalMouseEventArgs e, InteractionContext context) { if (this.IsActive) { this.OnBeforeScaleFactorChanged((EventArgs)e); int num = System.Math.Sign(e.MouseWheelDelta); if (num > 0) { this.double_0 *= 1.1; } else if (num < 0) { this.double_0 /= 1.1; } this.OnScaleFactorChanged((EventArgs)e); } return(this.IsActive); }
private void method_0(CanonicalMouseEventArgs e, InteractionContext context) { Point2D point2D = new Point2D(0.5 * context.CanvasRectangle.Size.X, 0.5 * context.CanvasRectangle.Size.Y); Point2D position = e.Position; Vector2D vector2D1 = position - point2D; if (!(vector2D1 != Vector2D.Zero)) { return; } double num1 = System.Math.Atan2(-vector2D1.Y, vector2D1.X); if (this.nullable_0.HasValue) { Vector2D vector2D2 = this.nullable_0.Value - point2D; double num2 = System.Math.Atan2(-vector2D2.Y, vector2D2.X); if (num1 != num2) { this.TransformationProvider.ModelOrientation *= QuaternionD.FromAxisAngle(Vector3D.ZAxis, num1 - num2); } } this.nullable_0 = new Point2D?(position); }
private void method_0(CanonicalMouseEventArgs e, InteractionContext context) { Point2D point2D = new Point2D(0.5 * context.CanvasRectangle.Size.X, 0.5 * context.CanvasRectangle.Size.Y); Point2D position = e.Position; Vector2D vector2D1 = position - point2D; if (!(vector2D1 != Vector2D.Zero)) { return; } double num1 = System.Math.Atan2(-vector2D1.Y, vector2D1.X); if (this.nullable_0.HasValue) { Vector2D vector2D2 = this.nullable_0.Value - point2D; double num2 = System.Math.Atan2(-vector2D2.Y, vector2D2.X); if (num1 != num2) { this.double_0 += num1 - num2; this.OnOrientationChanged((EventArgs)e); } } this.nullable_0 = new Point2D?(position); }
public bool ProcessMouseDoubleClick(CanonicalMouseEventArgs e, InteractionContext context) { return(this.iinteractor_0.ProcessMouseDoubleClick(e, context)); }
public virtual bool ProcessMouseWheel(CanonicalMouseEventArgs e, InteractionContext context) { return(this.iinteractor_0.ProcessMouseWheel(e, context)); }
public bool ProcessTextInput(string text, InteractionContext context) { return(this.iinteractor_0.ProcessTextInput(text, context)); }
public virtual bool ProcessMouseClick(CanonicalMouseEventArgs e, InteractionContext context) { return(false); }
public virtual void Draw( PaintEventArgs e, GraphicsHelper graphicsHelper, InteractionContext context) { }
public virtual bool ProcessTextInput(string text, InteractionContext context) { return(false); }