/// <summary> /// Rotates this to the right about the origin provided. /// Note that as the horizontal/vertical line property will be /// preserved. If you rotate an object and its bounding box, the box may not still /// bound the object. /// </summary> /// <param name="dAng">The angle through which to rotate.</param> /// <param name="Origin">The origin about which to rotate.</param> public override void RotateToRight(double dAng, C2DPoint Origin) { double dHalfWidth = Width() / 2; double dHalfHeight = Height() / 2; C2DPoint ptCen = new C2DPoint(GetCentre()); ptCen.RotateToRight(dAng, Origin); TopLeft.x = ptCen.x - dHalfWidth; TopLeft.y = ptCen.y + dHalfHeight; BottomRight.x = ptCen.x + dHalfWidth; BottomRight.y = ptCen.y - dHalfHeight; }