Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Using the Vector Tool5:36 with Christopher Downer
The Sketch Vector tool allows you draw shapes by placing and adjusting vector points on the canvas. Using this method gives you far more control in creating complex shapes.
You can see these and more features at the Bohemian Coding Features Page
- Select the Vector tool via the Insert menu or by pressing V on your keyboard.
The pen or vector tool allows you to draw shapes by placing and 0:00 adjusting vector points on the canvas. 0:04 Using this method gives you far more control in creating complex shapes. 0:07 The vector tool can be selected via the Insert menu or 0:12 by pressing V on your keyboard. 0:15 Click anywhere on the canvas to begin drawing. 0:18 As you move your cursor, the line from the starting point 0:22 will follow your cursor until you place your next point by clicking on the canvas. 0:25 If you click and drag to create a new point, 0:31 you'll see this extra line appear with dots on the end called handles. 0:34 These are used to create curved lines as opposed to straight ones. 0:39 And if you click and drag a handle, you can adjust the arc over curve. 0:43 If you look in the Inspector, you can see the four point types that Sketch supports. 0:53 Right now with this point, you can see it is on the default Mirrored type 0:58 Sketch gives you when you create a curve. 1:02 If we create a new point without dragging it to form a curve, it will be straight. 1:05 But this is something you can alter. 1:12 So let's change this point to Mirrored too. 1:14 [BLANK_AUDIO] 1:16 When the setting is Mirrored, 1:21 the two handles are an equal distance from the point. 1:22 If we change the type to Asymmetric, both handles will move as you adjust the angle. 1:27 [BLANK_AUDIO] 1:32 But you can now make the distance of the handles from 1:39 the points independent to each other. 1:42 To adjust them completely, select Disconnected and drag a handle. 1:46 [BLANK_AUDIO] 1:51 As a result, the path could look quite sharp rather than being a perfect curve. 1:54 But this can be useful for certain things, like creating the shark fin-looking shape. 2:00 Selecting the last point to be placed and 2:07 then moving our cursor will make the next point we place curved as well, 2:09 because of the Asymmetric point site that this point has. 2:13 But when I place it, it will create a straight point unless I click and 2:17 drag to make another Mirrored point. 2:22 It is not something that is required. 2:24 But it can be useful to close the path by clicking on the first point or 2:27 selecting Close Path at the top of the Inspector. 2:32 You need to do this if you wish to perform a bullion operation on this shape. 2:36 At any point during the drawing process, 2:41 you can add new points by clicking on the path. 2:44 Or delete a point, by selecting it and pressing Backspace. 2:49 And you can also move points by clicking and dragging. 2:53 Once you want to leave the editing mode, press Enter or select Finish Editing. 2:57 It can also edit vectors of existing shapes, like rectangles, 3:04 by pressing Enter or Edit in the tool bar when this shape is selected. 3:08 Here you can also add or remove points, change points types, or 3:13 completely adjust the shape to something else. 3:18 Let me move this out of the way and draw a rectangle. 3:22 As well as editing the individual points of a shape, 3:30 you can edit the layer as a whole using Transform in the toolbar. 3:32 You can apply perspective to a layer by clicking and 3:37 dragging one of the circular handles that appear. 3:40 [BLANK_AUDIO] 3:42 You can easily change this rectangle into a trapezium just by applying a simple 3:46 transform. 3:51 Pressing Rotate in the tool bar will allow you to rotate your layer by clicking and 3:54 dragging one of the corners. 3:58 You can keep track and adjust the angle in the Inspector under the Height and 4:00 Width fields. 4:04 By default the layer will rotate from the center, but 4:06 you can adjust the rotation origin by moving the cross haired marker in 4:09 the middle to anywhere inside or outside the layer. 4:13 Finally we can flip the layer vertically, 4:23 horizontally by these two buttons next to the Rotate field. 4:25 I typically use this after I've duplicated a layer 4:30 if I want to make something look symmetrical. 4:33 Masking is also something you can do with layers in Sketch. 4:39 There's a couple of different ways you can do this, but 4:43 we'll create a mask via the toolbar item. 4:46 To mask something, we need to have two or more layers that overlap each other. 4:49 So let's take an oval shape and a rectangle. 4:55 [BLANK_AUDIO] 4:57 If we change the rectangle's color and 5:06 have it lie on top of the oval, we select both and press Mask. 5:08 As if by magic, 5:15 the side of the rectangle will inherit the rounded edge of the oval underneath. 5:16 This isn't destructive at all, and you can edit both layers however you like. 5:21 Move them around and unmask them to how they were before. 5:26 [BLANK_AUDIO] 5:29
You need to sign up for Treehouse in order to download course files.Sign up