public virtual void RotateAtCentroid(float degrees) { PolygonF rotatePly = PolygonF.Rotate(this, degrees, this.Centroid); this.Clear(); this._pnts.AddRange(rotatePly._pnts.ToArray()); if (this._preCalcBBox) { this.UpdateMinMax(this._pnts); } rotatePly.Clear(); }
public static Polygon Rotate(Polygon ply, float degrees, Point center) { return(Polygon.Truncate(PolygonF.Rotate(ply._ply, degrees, new PointF((float)center.X, (float)center.Y)))); }