Лабораторная работа 1. Правки 2
This commit is contained in:
parent
70bbd74e9e
commit
2678df6efe
@ -76,13 +76,13 @@ public class DrawningElectricLocomotive
|
|||||||
return false;
|
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;
|
_pictureWidth = width;
|
||||||
_pictureHeight = height;
|
_pictureHeight = height;
|
||||||
|
Loading…
Reference in New Issue
Block a user