PIbd-12_Bugrov_D.A._LabWork01 Simple #1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user