Can anyone explain for me this code i can`t understand it ....
Code:Sub dimSquare() If xUp < 0 Then xUp = 0 If xUp > 600 Then xUp = 600 If yUp < 0 Then yUp = 0 If yUp > 480 Then yUp = 480 intW = Math.Abs(xUp - xDown) intH = Math.Abs(yUp - yDown) If intW > intH Then intW = intH If xUp < xDown Then intL = xDown - intW Else intL = xDown If yUp < yDown Then intT = yDown - intW Else intT = yDown End Sub Sub dimRectangle() If xUp < 0 Then xUp = 0 If xUp > 1000 Then xUp = 1000 If yUp < 0 Then yUp = 0 If yUp > 480 Then yUp = 480 intW = Math.Abs(xUp - xDown) intH = Math.Abs(yUp - yDown) If xUp < xDown Then intL = xDown - intW Else intL = xDown If yUp < yDown Then intT = yDown - intH Else intT = yDown End Sub Sub dimCircle() If xUp < 0 Then xUp = 0 If xUp > 600 Then xUp = 600 If yUp < 0 Then yUp = 0 If yUp > 480 Then yUp = 480 intW = Math.Abs(xUp - xDown) intH = Math.Abs(yUp - yDown) If intW < intH Then intW = intH intL = xDown - intW intT = yDown - intW intW *= 2 End Sub Sub dimEllipse() If xUp < 0 Then xUp = 0 If xUp > 600 Then xUp = 600 If yUp < 0 Then yUp = 0 If yUp > 480 Then yUp = 480 intW = Math.Abs(xUp - xDown) intH = Math.Abs(yUp - yDown) intL = xDown - intW intT = yDown - intH intW *= 2 intH *= 2 End Sub




Reply With Quote
