public override void move(double x, double y, GrafPack grafPack) { base.move(x, y, grafPack); centre.X += (int)x; centre.Y += (int)y; grafPack.Invalidate(); }
public override void rotate(double rotation, GrafPack grafPack) { base.rotate(rotation, grafPack); keyPt = rotatePoint(keyPt, centre, rotation); oppPt = rotatePoint(oppPt, centre, rotation); grafPack.Invalidate(); }
public override void move(double x, double y, GrafPack grafPack) { base.move(x, y, grafPack); keyPt.X += (int)x; keyPt.Y += (int)y; oppPt.X += (int)x; oppPt.Y += (int)y; grafPack.Invalidate(); }
public override void rotate(double rotation, GrafPack grafPack) { Point midPoint = FindCenterPoint(topPoint, leftPoint, rightPoint); Console.WriteLine(midPoint.X + " " + midPoint.Y); topPoint = rotatePoint(topPoint, midPoint, rotation); rightPoint = rotatePoint(rightPoint, midPoint, rotation); leftPoint = rotatePoint(leftPoint, midPoint, rotation); grafPack.Invalidate(); }
public override void move(double x, double y, GrafPack grafPack) { Console.WriteLine("Moving"); topPoint.X += (int)x; topPoint.Y += (int)y; rightPoint.X += (int)x; rightPoint.Y += (int)y; leftPoint.X += (int)x; leftPoint.Y += (int)y; grafPack.Invalidate(); }
public override void rotate(double rotation, GrafPack grafPack) { Point midPoint = FindCenterPoint(topLeft, topRight, bottomLeft, bottomRight); Console.WriteLine(rotation); Console.WriteLine("Before: " + topRight.X + " " + topRight.Y); topLeft = rotatePoint(topLeft, midPoint, rotation); topRight = rotatePoint(topRight, midPoint, rotation); bottomLeft = rotatePoint(bottomLeft, midPoint, rotation); bottomRight = rotatePoint(bottomRight, midPoint, rotation); Console.WriteLine("After: " + topRight.X + " " + topRight.Y); grafPack.Invalidate(); }