PIbd-12_Bugrov_D.A._LabWork01 Simple #1

Closed
BoiledMilk wants to merge 4 commits from LabWork01 into main
Showing only changes of commit 2678df6efe - Show all commits

View File

@ -76,13 +76,13 @@ public class DrawningElectricLocomotive
return false;
}
if(_startPosY.HasValue && _startPosY - _drawningElectricLocomotiveHeight < _pictureHeight )
if(_startPosY.HasValue && _startPosY + _drawningElectricLocomotiveHeight < _pictureHeight )
{
_startPosY -= _drawningElectricLocomotiveHeight;
_startPosY = _pictureHeight - _drawningElectricLocomotiveHeight;
}
if (_startPosX.HasValue && _startPosX - _drawningElectricLocomotiveWidth < _pictureWidth )
if (_startPosX.HasValue && _startPosX + _drawningElectricLocomotiveWidth < _pictureWidth )
{
_startPosX -= _drawningElectricLocomotiveWidth;
_startPosX = _pictureWidth - _drawningElectricLocomotiveWidth;
}
_pictureWidth = width;
_pictureHeight = height;