// Constructor(s) public GLSignatureView(CGRect frame, NewSignatureViewController root) : base(frame) { nsvc = root; this.EnableSetNeedsDisplay = true; this.BackgroundColor = UIColor.Yellow; // set up OpenGL context this.context = new EAGLContext(EAGLRenderingAPI.OpenGLES2); this.Context = this.context; if (this.context != null) { this.DrawableDepthFormat = GLKViewDrawableDepthFormat.Format24; // Turn on antialiasing this.DrawableMultisample = GLKViewDrawableMultisample.Sample4x; // More OpenGL setup this.SetupGL(); // set up gesture recognizers panner = new UIPanGestureRecognizer(this, new ObjCRuntime.Selector("GLSignatureViewPan:")); panner.MaximumNumberOfTouches = panner.MinimumNumberOfTouches = 1; this.AddGestureRecognizer(panner); tapper = new UITapGestureRecognizer(this, new ObjCRuntime.Selector("GLSignatureViewTap:")); this.AddGestureRecognizer(tapper); } else { throw new Exception("Failed to create OpenGL ES2 context"); } }
public BezierSignatureView(CGRect frame, NewSignatureViewController root) : base(frame) { this.nsvc = root; this.drawPath = new CGPath(); this.BackgroundColor = UIColor.Yellow; this.MultipleTouchEnabled = false; panner = new UIPanGestureRecognizer(this, new ObjCRuntime.Selector("BezierSignatureViewPan:")); panner.MaximumNumberOfTouches = panner.MinimumNumberOfTouches = 1; this.AddGestureRecognizer(panner); }