1
00:00:00,360 --> 00:00:06,010
Hi, so in this video, I will show you how you can drop something on a canvas for the moment.

2
00:00:06,030 --> 00:00:11,900
We will start drawing something without the mouse, which means we create the program.

3
00:00:12,180 --> 00:00:16,050
Then after running it, we will see that what we what we like.

4
00:00:16,090 --> 00:00:24,360
Will we show you how you can draw a line or how we can draw a we can say a circle or we can see a lot

5
00:00:24,590 --> 00:00:25,490
of stuff.

6
00:00:25,800 --> 00:00:29,510
So we will do that here after that in the next video.

7
00:00:29,760 --> 00:00:32,150
I will show you how you can do it using the mouse.

8
00:00:32,240 --> 00:00:36,770
OK, so as we did before, we had to create the application.

9
00:00:36,810 --> 00:00:40,740
So you have to import everything.

10
00:00:42,390 --> 00:00:45,660
Then we have the called key.

11
00:00:47,730 --> 00:00:52,090
Then people will mean to like this.

12
00:00:53,280 --> 00:00:58,080
Now what I have to do, I want to change the size of this application.

13
00:00:58,080 --> 00:01:00,600
So you have to do.

14
00:01:01,820 --> 00:01:12,350
I can tell if you're actually like this, then we have to be handled by 300 or yes, I really would

15
00:01:12,350 --> 00:01:12,800
like this.

16
00:01:13,340 --> 00:01:20,450
Now we have to create the canvas so we have canvas, equal canvas that was in the shop.

17
00:01:20,450 --> 00:01:24,300
And I will change the background as well.

18
00:01:24,320 --> 00:01:42,200
I will put it like like this then we like it's it was the bug and we feel feel will both then expand.

19
00:01:42,530 --> 00:01:43,790
It will one.

20
00:01:44,850 --> 00:01:46,450
Now we'll see how it look.

21
00:01:46,740 --> 00:01:53,430
Yes, this is our application now I want to create a line, for example, from here to here or from

22
00:01:53,430 --> 00:01:54,980
here to here or something like that.

23
00:01:55,530 --> 00:01:58,440
So we will see that it is very, very easy to do that here.

24
00:01:58,460 --> 00:02:05,470
There is an application, there is a function as we had an uptick and a function that will create the

25
00:02:06,150 --> 00:02:11,580
image because we had when we wanted to put an image on the canvas, we used a function called Create

26
00:02:11,580 --> 00:02:11,990
Image.

27
00:02:12,150 --> 00:02:13,300
So he did the same thing.

28
00:02:13,320 --> 00:02:20,250
There is a function called create a line and there is a function called Create Over, etc. So to create

29
00:02:20,250 --> 00:02:22,210
a line will do the same thing.

30
00:02:22,230 --> 00:02:33,300
You have canvas that create a I will start by a line create.

31
00:02:36,390 --> 00:02:47,160
Lying like this now, this function has some parameters, the first parameters will be the X and Y for

32
00:02:47,160 --> 00:02:48,380
the two points.

33
00:02:48,600 --> 00:02:55,680
So if I want to draw something from this point to this point, so I have to give the coordinates of

34
00:02:55,680 --> 00:03:00,450
this point and the coordinates of this point, which means the coordinates of the starting point and

35
00:03:00,450 --> 00:03:03,010
the coordinates of the ending point.

36
00:03:03,450 --> 00:03:13,230
So here, which means, for example, x1 then y one means the first point, then here we have to the

37
00:03:13,320 --> 00:03:21,490
y to like it is now that we didn't define this X and Ys, but here it will be something like this.

38
00:03:21,490 --> 00:03:25,830
So this coordinates for the first point and this coordinates one second point.

39
00:03:26,760 --> 00:03:35,840
Now, for example, I want to start from zero zero into, for example, two hundred ninety nine, I

40
00:03:36,330 --> 00:03:41,450
did come up and do four and the two hundred ninety like something like this.

41
00:03:42,110 --> 00:03:46,560
Now, what I had, if I will run, is I think that we will see nothing.

42
00:03:46,560 --> 00:03:51,270
But the line is here, but the color of the line is black with the background is black.

43
00:03:51,270 --> 00:03:52,310
We can see it now.

44
00:03:52,320 --> 00:03:54,770
We should change the color of this line.

45
00:03:55,200 --> 00:03:59,280
So to change it here we have a function called fit.

46
00:03:59,820 --> 00:04:05,160
So it is function field, which means we will see which color or which guess which color we'll use to

47
00:04:05,160 --> 00:04:06,330
fill this line.

48
00:04:06,660 --> 00:04:13,220
So here, for example, I would put it red and we see here is our line like this.

49
00:04:13,240 --> 00:04:15,180
So this line is red one.

50
00:04:15,510 --> 00:04:19,910
So it starts from zero zero into two hundred ninety nine to the next line.

51
00:04:20,160 --> 00:04:22,080
I didn't want to try it.

52
00:04:22,090 --> 00:04:22,560
Three hundred.

53
00:04:22,560 --> 00:04:29,910
I think that it will not work because we have to 300 means it starts from zero to two hundred and ninety

54
00:04:29,910 --> 00:04:30,150
nine.

55
00:04:30,150 --> 00:04:30,530
Sorry.

56
00:04:31,050 --> 00:04:32,580
So here is our line.

57
00:04:32,580 --> 00:04:36,060
So we can't change any stuff here if I don't watch it here.

58
00:04:38,580 --> 00:04:39,240
Twenty two.

59
00:04:39,240 --> 00:04:39,900
Why not.

60
00:04:40,090 --> 00:04:42,740
We see here is our line etc..

61
00:04:42,810 --> 00:04:47,250
So we will, we will put the starting point and the ending point.

62
00:04:47,460 --> 00:04:49,110
It will draw a line for us.

63
00:04:49,530 --> 00:04:56,730
Now if I want to change the size of this line or the width of this line, we can change it also.

64
00:04:57,120 --> 00:04:59,670
So I will put same thing here.

65
00:04:59,670 --> 00:05:00,750
I will leave it like it is.

66
00:05:00,990 --> 00:05:07,770
So if I want to change it, that is the function with, then we will give it, for example, three and

67
00:05:08,220 --> 00:05:14,130
you will see that three really is a bit bigger that I can put it five like this.

68
00:05:15,900 --> 00:05:21,870
And it is more bigger like this, so this is how we can create a line in the winter.

69
00:05:22,180 --> 00:05:30,780
Now I will show you how we can create a overlord or a circle on at the same time using the same parameters,

70
00:05:30,780 --> 00:05:32,190
only the function will change.

71
00:05:32,460 --> 00:05:40,180
So here we are all in the place of using or instead of using line, we will use the function over like

72
00:05:40,530 --> 00:05:41,100
this one.

73
00:05:41,430 --> 00:05:47,470
So this one will create a circle or an oval shape in the image.

74
00:05:47,490 --> 00:05:48,360
So we will see.

75
00:05:48,780 --> 00:05:53,070
I am not sure that these coordinates will give us something visible, but we see here.

76
00:05:53,280 --> 00:05:54,490
So this is the image.

77
00:05:54,510 --> 00:05:58,320
This is the oval that we had a little bit smaller.

78
00:06:02,630 --> 00:06:09,830
One hundred and one hundred, so this the same thing we have the Centrepoint or we have the starting

79
00:06:09,830 --> 00:06:14,120
point into the center point of the circle.

80
00:06:14,420 --> 00:06:25,680
So the center point, for example, will be this one and the iron the output point of the the or the

81
00:06:25,690 --> 00:06:27,510
circle will be this one.

82
00:06:27,740 --> 00:06:35,270
So here we have four that we have start with zero zero into this coordinate this point also.

83
00:06:35,870 --> 00:06:41,690
So here is our small small circle, for example, and you can change the position of it.

84
00:06:41,690 --> 00:06:48,040
So you can put it, for example, here or here or here, anywhere you want change using these coordinates.

85
00:06:48,590 --> 00:06:55,160
So that was how you can create a shape like line or oval or something like that in Kalyvas.

86
00:06:55,460 --> 00:07:00,440
In the next video, I will show you how you can do this stuff, for example, how we can do something

87
00:07:00,440 --> 00:07:01,550
using the mouse.

88
00:07:01,970 --> 00:07:03,030
So like.
