Hello, in this video I am going to show you the transform class. So the transform class simply allows you to transform the contents of you know what's inside of it. So it could be an image could be text, I'm going to use an image, but you could put a container inside of it, you could put a just an image per a row or column allows you to put multiple widgets inside of it. So I've got this child with the container and inside they've got a child who's in an image on a chain this container to a transform with you too late, literally change it to transform. This has a requirement, it needs a transfer property that's like the minimum requirement then they need to do it this is not optional. So equals form.
And if you put matrix for this is to do matrices, matrix for and you can rotate it along one of the axes. You can translate it translational movement, rotation With offices rotation and skewness, and she likes to actually, I was going to deal with rotation but you can check out the others as well. I'm gonna do rotation by the depth which will be rotation in the normal 2d, normal 2d rotation. So because it is in radians, that's something to bear in mind, you can get it converted to converted from radio to desktop, I mean two degrees if you want to own but zero for now, just so you can see nothing change so nothing changes. Let's say how many 45 degrees 3.14 180 degree basically pi 1.57 will be 90 degrees. So it is half of that 0.78 quite roughly 0.785 0.785 should be 45 degrees.
Okay, as you can see it's rotated by the top left. If you want to change that and obviously host your mind For example, you rotate it the other way. For a chain, the point that it's rotating around you just put origin and is an offset. So how many essentially not optical you want to move left and right, the property 100 by 102, Chinese zero. This is normal. And as you can see, it's rotated by about, you know, this forum point here.
So what I want you to do as an extra task is experiment with this experiment with the different rotation matrices, the translation and the skewing ones, but also try and see if you can make this dynamic. So we rotate it by the center of the image, your low clue, you'll want to create this into a variable and get the width and the height and do your need to do something with that. If you have any questions, feel free to pop me a message. Anneliese will. I look forward to seeing you in the next video