Лабораторная работа: Creating graphic editor

MainPic. DrawWidth = PencilSize

MainPic. Line (XX, YY) – (x, y), FirstColor: XX = x: YY = y

MainPic. DrawWidth = 1

Case 3

MainPic. Line (Shape1. Left, Shape1. Top) – (Shape1. Left + Shape1. Width, Shape1. Top + Shape1. Width), EraserColor, BF

Case 4, 5, 8

XX2 = x: YY2 = y

Shape2. Left = IIf (x > XX, XX, x)

Shape2. Top = IIf (y > YY, YY, y)

Shape2. Width = Abs (x – XX)

Shape2. Height = Abs (y – YY)

Case 6

Scroll(0).Value = TakeRGB (MainPic. Point (x, y), 0)

Scroll(1).Value = TakeRGB (MainPic. Point (x, y), 1)

Scroll(2).Value = TakeRGB (MainPic. Point (x, y), 2)

End Select

Exit Sub

10 If Button <> 2 Or CurrentChoice <> 6 Then Exit Sub

Scroll(3).Value = TakeRGB (MainPic. Point (x, y), 0)

Scroll(4).Value = TakeRGB (MainPic. Point (x, y), 1)

Scroll(5).Value = TakeRGB (MainPic. Point (x, y), 2)

End Sub

Private Sub MainPic_MouseUp (Button As Integer, Shift As Integer, x As Single, y As Single)

If Button <> 1 Then Exit Sub

Select Case CurrentChoice

Case 1

MainPic. DrawWidth = PencilSize

MainPic. Line (Line1.X1, Line1.Y1) – (Line1.X2, Line1.Y2), FirstColor

MainPic. DrawWidth = 1

К-во Просмотров: 445
Бесплатно скачать Лабораторная работа: Creating graphic editor