Hey everyone.
So in the last two really consider the button in this video we're going to work on canvas.
That is the second widget I have considered.
But this one is a little different from all the other projects.
You will find a little difficult to create this one.
So let's begin first of all creating a canvas is very easy.
You can do the same.
Like the button here.
If I have a variable C denoting a canvas then here canvas in which I have C capital so can first name
that one I need to first pass in which window I want.
This one say my window.
After that you need to specify height and feet.
And these are something options you will also find.
In the options that is here we have height and weight and dazzling to use this one big mango color.
Here we have first one height say 250 that is in Big Sur.
Then we have added
that said 300.
Then background color.
Say blue here we had dessert.
Now you just need to unpack that.
So see the back come on this.
And there we have the terminal if I done this one I got this canvas first my window in that front.
I had this canvas in it you can do any kind of figure so some standard items you can draw there are
listed on the dots here.
This five image nine or will in polygon.
First let me create the arc and then I will tell you how these.
So for creating an arc that's something adding another window in the window.
So you need to add some figure here.
So what you need to do here is you are going to add something in the canvas so that something like if
you remember adding J.
So we are going to add child and canvas.
That is in window.
So what we will do here we consider a variable.
OK and three we want this one.
So this one is a little typical.
Try to understand this one seed dot bus create and whatever you want to create underscored arc.
Now the panties in which you need to define some coordinates that at which point you need that one and
then you need to define starting and ending points and any color if you want to I hope this is easy
to understand like creating any feel you require some points then it's starting and ending point and
then any color.
So for coordinates let's define here for your coordinates say 10 15 to 40 and 200 and then it goes over.
This one is 250 goes 300 so we cannot take pride in this.
So no indictment Bostic coordinates.
So instead of passing a list here I have just passed the coordinate.
After that when you need a start point that it says from zero an arc is a curve and is a part of us
so local.
So it requires some angle.
So this is actually an angle beginning from zero and extending up to some extent.
Make sure this is excellent and 750 degree and the bedroom color that is filtered to pass here.
So this one great commanders.
And if you run this one now here you will get this one.
A club is created here and this is an arc a part of circle in which we have this one big from this point
zero and extending up to 150.
This is you can also imagine here we have definitely and this is approximately 150.
If you change the angle say this one one hundred and eighty and the start point is we have 90 degree
save this one.
And if you run this one now there you have this one.
We have extended this one up to 180 degrees beginning from 90.
So from 90 we have here 180 degrees so that we have a simple one beginning from zero and extending to
one hundred and fifty.
This is how you can create the figures in canvas so the five basic figures are listed here.
Like in the article require coordinates then canvas to create underscored.
OK similarly here image created underscored image here.
Create underscore line create underscore all and Polygon after that the inside things are different
from every of these like full arc you require coordinates and starting angle and extending.
But for image you did not require that.
But for that phone you require an image file that is your image saved in your computer.
Here we have this.
Then do we have different parameter that is there height weight and an anchor and a after that creating
a line we just require the line starting and ending point.
Let me also show you creating a line.
That's how you can create a line so Hill and the variable C line.
I want this one in my canvas so see don't create underscore.
Line then here I have C being from N and then I have two hundred two hundred visa.
I am taking x x is and Vi X is done again and point x x is in VI axis.
After that one here.
If you take simply 10 and 200 that's something you are now working on.
Toby so starting point is if you want like the hammock and most it is like if you even defined this
point you require an x axis and Vi axis and this and a point to say descent point you'll be adequate
x axis in by axis.
So I have taken first down and ten desert X Brooke.
Similarly here at this point two hundred two hundred maybe here.
So this one is going to be hard line starting from here and ending here.
And after that once we have a different color that can be visible there like white save this one.
Now you are required to change these by the same and again Don Dedmon.
Here we have a line beginning from and then that is near to this one.
And here we have the two hundred goes two hundred.
So that's how you can view the figures here.
You can try the other figures also that are listed in the notes these polygon over for just simple practice
but if you understand this then it's enough for you.
So this is about the canvas the denoted y and again was much in the projects.
There's something a fidget I need to tell you so that you can know how different types of visits work.
So thanks for watching.
In the next video we will begin to work with Jack Butler.
See you there.