resetting manual scaling
fixing affinetransform, and modifying mainstate's paint method