PIbd-12 UlybinA.A. Monorail LabWork01 Simple #1

Closed
qkrlnt wants to merge 3 commits from Lab01 into main
Showing only changes of commit 42aa45de02 - Show all commits

View File

@ -106,10 +106,18 @@ public class DrawingMonorail
{
return;
}
if (x < 0)
{
x = 0;
}
if (x + _drawingMonorailWidth > _pictureWidth.Value)
{
x = _pictureWidth.Value - _drawingMonorailWidth;
}
if (y < 0)
{
y = 0;
}
if (y + _drawingMonorailHeight > _pictureHeight.Value)
{
y = _pictureHeight.Value - _drawingMonorailHeight;