protected internal virtual void SetBoundsChanged(float centerX, float centerY, float rotateAngle, float skewX, float skewY, float scaleX, float scaleY, PointF[] polygon, DUIBoundsPolygonSpecified specified) { var polygonRect = PolygonTools.GetPolygonRect(polygon); float x = polygonRect.X; float y = polygonRect.Y; float width = polygonRect.Width; float height = polygonRect.Height; if ((specified & DUIBoundsPolygonSpecified.CenterX) == DUIBoundsPolygonSpecified.None) { centerX = this.mouseDownCenter.X; } if ((specified & DUIBoundsPolygonSpecified.CenterY) == DUIBoundsPolygonSpecified.None) { centerY = this.mouseDownCenter.Y; } if ((specified & DUIBoundsPolygonSpecified.RotateAngle) == DUIBoundsPolygonSpecified.None) { rotateAngle = this.mouseDownRotateAngle; } if ((specified & DUIBoundsPolygonSpecified.SkewX) == DUIBoundsPolygonSpecified.None) { skewX = this.mouseDownSkew.X; } if ((specified & DUIBoundsPolygonSpecified.SkewY) == DUIBoundsPolygonSpecified.None) { skewY = this.mouseDownSkew.Y; } if ((specified & DUIBoundsPolygonSpecified.ScaleX) == DUIBoundsPolygonSpecified.None) { scaleX = this.mouseDownScale.X; } if ((specified & DUIBoundsPolygonSpecified.ScaleY) == DUIBoundsPolygonSpecified.None) { scaleY = this.mouseDownScale.Y; } if ((specified & DUIBoundsPolygonSpecified.Polygon) == DUIBoundsPolygonSpecified.None) { polygon = this.mouseDownPolygon; } if (this.mouseDownBounds.X != x || this.mouseDownBounds.Y != y || this.mouseDownBounds.Width != width || this.mouseDownBounds.Height != height || this.mouseDownCenter.X != centerX || this.mouseDownCenter.Y != centerY || this.mouseDownRotateAngle != rotateAngle || this.mouseDownSkew.X != skewX || this.mouseDownSkew.Y != skewY || this.mouseDownScale.X != scaleX || this.mouseDownScale.Y != scaleY || !PolygonTools.PolygonEquels(this.mouseDownPolygon, polygon)) { UpdateBoundsChanged(x, y, width, height, centerX, centerY, rotateAngle, skewX, skewY, scaleX, scaleY, polygon); } }
public virtual void SetBounds(float centerX, float centerY, float rotateAngle, float skewX, float skewY, float scaleX, float scaleY, PointF[] polygon, DUIBoundsPolygonSpecified specified, bool invalidate = true) { var polygonRect = PolygonTools.GetPolygonRect(polygon); float x = polygonRect.X; float y = polygonRect.Y; float width = polygonRect.Width; float height = polygonRect.Height; if ((specified & DUIBoundsPolygonSpecified.CenterX) == DUIBoundsPolygonSpecified.None) { centerX = this.centerX; } if ((specified & DUIBoundsPolygonSpecified.CenterY) == DUIBoundsPolygonSpecified.None) { centerY = this.centerY; } if ((specified & DUIBoundsPolygonSpecified.RotateAngle) == DUIBoundsPolygonSpecified.None) { rotateAngle = this.rotate; } if ((specified & DUIBoundsPolygonSpecified.SkewX) == DUIBoundsPolygonSpecified.None) { skewX = this.skewX; } if ((specified & DUIBoundsPolygonSpecified.SkewY) == DUIBoundsPolygonSpecified.None) { skewY = this.skewY; } if ((specified & DUIBoundsPolygonSpecified.ScaleX) == DUIBoundsPolygonSpecified.None) { scaleX = this.scaleX; } if ((specified & DUIBoundsPolygonSpecified.ScaleY) == DUIBoundsPolygonSpecified.None) { scaleY = this.scaleY; } if ((specified & DUIBoundsPolygonSpecified.Polygon) == DUIBoundsPolygonSpecified.None) { polygon = this.polygon; } if (this.x != x || this.y != y || this.width != width || this.height != height || this.centerX != centerX || this.centerY != centerY || this.rotate != rotateAngle || this.skewX != skewX || this.skewY != skewY || this.scaleX != scaleX || this.scaleY != scaleY || !PolygonTools.PolygonEquels(this.polygon, polygon)) { UpdateBounds(x, y, width, height, centerX, centerY, rotateAngle, skewX, skewY, scaleX, scaleY, polygon, invalidate); } }