public TouchRect(int x, int y, int width, int height, SwipeTrigger eventToTrigger, bool pointIsCenter = false, object state = null) { if (pointIsCenter) { X = x - width / 2; Y = y - height / 2; } else { X = x; Y = y; } Width = width; Height = height; SwipeEventToTrigger = eventToTrigger; State = state; }
public TouchRect(Point p, int width, int height, SwipeTrigger eventToTrigger, bool pointIsCenter = false, object state = null) : this(p.X, p.Y, width, height, eventToTrigger, pointIsCenter, state) { }
public TouchRect(Point p, Point size, SwipeTrigger eventToTrigger, bool pointIsCenter = false, object state = null) : this(p.X, p.Y, size.X, size.Y, eventToTrigger, pointIsCenter, state) { }
public TouchRect(Rectangle rect, SwipeTrigger eventToTrigger, bool pointIsCenter = false, object state = null) : this(rect.X, rect.Y, rect.Width, rect.Height, eventToTrigger, pointIsCenter, state) { }