Vector shape tools: Rectangle Tool.

08.04.2019

Drawing tools allow you to create and edit vector shapes. They make it easy to create various elements for web pages.

The following family of tools allows you to create geometric shapes of various shapes.

Rectangle (Rectangle)() - respectively, allows you to draw a rectangle (and with the key pressed - a square), filled with the foreground color.
Rounded Rectsngle (Rounded straight square)- creates shapes similar to those described above, but allows you to set the radius of the rounding of the corners of the rectangle.

Ellipse (Ellipse)- creates ovals (in combination with the pressed key - circles).
Polygon(Polygon)- allows you to create geometric shapes with an arbitrary number of angles, as well as multi-beam stars. By default creates a convex pentagon.
Line- draws straight lines of arbitrary or specified length, thickness, color and direction.
Custom Shape- allows you to create a geometric figure of arbitrary shape and save it for later use.

Create a new training file.

Left click on tool - figures - on the toolbar, the tool selection window will open:


Here are the main shapes that we can use. Choose any and look at the options panel:

For any figure, you can choose:

  • drawing mode:
    • shape layer. The shape is created on a separate layer. A shape layer consists of a fill layer that defines the color of the shape, and an associated vector mask that defines the boundaries of the shape. The shape's borders are a path that appears in the Paths tab of the Layers panel.

    • contours. This mode allows you to draw outlines of shapes that can be filled or stroked with an arbitrary color. Paths appear on the Paths tab of the Layers panel.

    • Pixel fill . When working in this mode, not vector, but raster images are created, which can be processed in the same way as any raster image

  • style and color

  • set parameters specific to this figure

Draw rectangles

Let's choose the first shape - a rectangle. Select from the panel mode - layer-shape. Select a style by clicking on the triangle on the right.

Choose whichever you like. By the way, if you click on the triangle in the circle (on the right), you can select additional styles in the context menu that opens. If you do not want to use a style, then select a white square with a red line through it.

Now you can set the geometric parameters:

  • Arbitrarily - as you draw, so be it.
  • Square - when stretching the shape with the mouse, the width and height will always be the same.
  • Specified size - you can set the width and height of the rectangle (in cm) and click on the canvas. A rectangle with the specified dimensions will appear.
  • Set aspect ratio - you can set how many times the width will be less (or more) than the height. When stretching the figure, the proportion will be preserved.
  • From the center - draws a rectangle from the center.
  • Snap to pixels - rectangle edges snap to pixel borders.

Now select -arbitrarily- and drag your rectangle on the canvas with the mouse. Here, for example, what happened to me when using styles Button, Glass Buttons and Web Styles.



Quite a useful tool for creating buttons and menus for your web pages, isn't it?

Draw rectangles with rounded corners

Let's select the second shape - a rectangle with rounded corners. On the panel, select the mode - the layer-shape, the corner radius - for example, 15 and the color (you can style it as you like). The geometric parameters are the same as for the rectangle.

Here's what I got with various combinations of radius and style.

Why not news blocks and menu buttons?

Draw circles

Let's choose the third figure - an ellipse. On the panel, select the mode - shape layer, color and style. The geometric parameters are the same as for a rectangle, with the only difference being that a circle can be chosen instead of a square. Select -arbitrary- and stretch the ellipse. If you want it to be a circle, then hold down the Shift key or select -circle- in the geometric parameters.

Here's what happened to me:

Draw polygons

Let's choose a shape - a polygon. On the panel, select the mode - layer-shape, the number of sides in the range from 3 to 100 (for example, 3 - for a triangle, 6 - for a hexagon), color and style. Consider the geometric parameters:

  • Radius is the radius of the polygon.
  • Smooth outer corners
  • Star - with the checkbox unchecked, the polygon is convex, with the checkbox checked, the polygon is concave.
  • Beam depth - if the polygon is concave, then its vertices, as it were, form rays. This parameter shows how much of the polygon's radius will be occupied by rays. The higher the %, the longer and sharper the rays.
  • Smooth outer corners - with unchecked the corners are sharp; with a tick, the corners are rounded.

For example:



The first nonagon has a radius of 3 cm, the rest of the boxes are unchecked.

The second nonagon has a radius of 3 cm, the checkmark is -star-, the depth of the rays is 25%, the rest of the checkboxes are unchecked.

The third nonagon has a radius of 3 cm, the depth of the rays is 50%, all the checkboxes are checked.

All have a style applied.

Draw lines

Let's choose a figure - lines. On the panel, select the mode - layer-shape, line thickness (in pixels), color and style. Consider the geometric parameters:


If all the checkboxes are cleared, it will be just a line, the parameters set the arrows at the ends of this line.

  • Start- arrow at the beginning of the line.
  • End- arrow at the end of the line.
  • Width- proportions of the arrow as a percentage of the line thickness (from 10% to 1000%).
  • Length- proportions of the arrow as a percentage of the line thickness (from 10% to 5000%).
  • Curvature- determines the degree of curvature of the widest part of the arrow in the place where it meets the line (from -50% to +50%).

For example:



The first line is unchecked, width - 500%, length - 1000%, thickness - 2 pixels.

The second line has everything the same, but there is a tick at -beginning- and curvature - 5%.

The third line has everything the same, but the -end- checkbox is ticked and the -beginning- checkbox is unchecked.

The fourth line has both checkboxes, width - 500%, length - 1000%, curvature - 15%, thickness - 5 pixels.

All have a style applied.

Draw arbitrary shapes

Let's choose a figure - an arbitrary figure. On the panel, select the mode - shape layer, color and style. The geometric parameters are the same as for a rectangle. But here there is a choice of the figure itself:


Draw multiple shapes on one layer

The principle here is the same as with the rectangular selection tools (in the first lesson, we made a non-standard selection area using the tools on the options bar: add to selection, subtract from selection, etc.). The same tools are available in the Shapes Options bar.

For example, create a rectangle shape, now in the options bar click on the "add to shape area" icon, and now select an ellipse shape. Move the mouse cursor to the upper border of our rectangle, press the left mouse button and, without releasing, stretch the ellipse. It should look something like this:

If the ellipse is not stretched as you would like, you can fix it. To do this, take on the toolbar Path selection tool-

Move the cursor to the border of the ellipse and, holding down the left mouse button, drag the ellipse where it should be. Using all these tools, you can draw shapes of varying complexity.

Save Shapes

Let's say we liked the last shape we created and want to use it in the future. To do this, you need to save it. For this menu Edit -> Define Custom Shape. Give a name to the new shape.

Now our shape has appeared in the drop-down panel for selecting arbitrary shapes.

Although a square and a rectangle are the simplest geometric shapes, but in order to draw them in Photoshop, you need to make some effort and have basic knowledge. A beginner without proper training, most likely, will not cope with this task.

In this article, we will analyze the 3 most popular ways to draw a rectangle or square in Photoshop.

But before you start choosing a drawing method, you need to decide on future parameters. Rectangle/square can be:

  • filled with a solid color or only with borders drawn;
  • arbitrary or with precisely specified dimensions;
  • with the ability to change its size at any time without loss of quality.

Method 1. Arbitrary shape tool

In this method, the rectangle or square will be drawn with a solid color. If you only need the border, go to the next two methods.

Select the tool from the toolbar. There are two possible scenarios for the development of events:

Option 1. Square or rectangle with further resizing without loss of quality

Here, of course, the use of a vector figure is implied. To draw it, you need to select an option shape layer:

In the future, you can resize this figure without losing quality. To do this, use the tool - Ctrl + T , and use the corner handles to resize.

For those who don't know: vector shapes are not composed of pixels, but of special mathematical formulas. Therefore, resizing is not a process of stretching / shrinking pixels, but a complex mathematical recalculation, due to which there is no loss of quality.

Option 2. Standard (raster) square/rectangle

To draw a raster shape at once, use the setting on the Options Bar Perform pixel fill. But before you start drawing it -!

But in fact, you can draw immediately and vector, and then just it. Here you can choose for yourself.

How to make a rectangle square

The usual rule with the Shift key pressed does not work with arbitrary shapes. Therefore, you need to use the tool options panel and select a setting so that Photoshop draws a square.

In the same panel, pay attention, you can specify the exact size of the required rectangle/square or draw it according to predetermined proportions.

By default, dimensions are determined by pixels. If you want to change the unit of measurement, first enter a value in the field, and then right-click on it. The unit selection window will appear. Available: pixels, inches, centimeters, millimeters, points and peaks.

Rectangle or square with rounded corners

To get a shape with rounded corners, do the same as described above, but at the very beginning select the tool Rectangle with rounded edges. In the tool options bar, you only need to specify radius rounding.

Method 2. Stroke the selection

This method is as simple as 5 cents. select the tool and draw a rectangle with a dotted line. To draw a square, hold down the Shift key.

Now we need to stroke the borders of this selected area. To do this, go to Editing - Stroke.

Then, in the new window, set the stroke type: specify the frame thickness, the desired color and mark how the stroke will go:

  • Inside- so the frame will lie on the inside of the selected area;
  • Centered- so the frame is divided equally into a part passing inside the selection and into a part from the outside;
  • Outside- means the frame will go around the dotted selection line.

Here's how it might turn out:

In the screenshot above, I deliberately did not remove the dotted line, because it will not disappear for you either. To finally get rid of it, press Ctrl + D .

In this method, in order to draw a shape of the exact size, you first need to specify in the tool options bar StyleSpecified size or given proportions. After that, the fields will become active, where you enter the width and height values ​​in pixels. Right-clicking on one of these fields will bring up a menu for changing the units of measurement.

Method 2.1 Filling in the selection

The most common way to draw a rectangle is to draw a selection box (as described above) and simply fill it with any color. Here is a rectangle or square for you.

Method 3. Modification of the selection

In fact, I like this method least of all because of the obvious minus - the corners of the rectangle will be clipped, and the border of the frame itself is in a state and it is not possible to influence these facts.

So, you need to select the tool again, draw the frame of the future rectangle or square (with the Shift key), and then go to the menu Selection and choose a team Modification - Border.

A new window will appear in which, in our case, we specify the width of the border of the rectangle. Let's say I specify 7 pixels. We get the following result:

And now you just need to paint over the resulting frame. Suitable for this. Here, by the way, you can approach the issue more creatively and paint over, for example, with different colors. Result:

It remains only to remove the selection - Ctrl + D. I think this method is only suitable for my rare specific tasks, since feathering and undercut corners only spoil everything.

Noticed an error in the text - select it and press Ctrl + Enter . Thank you!

Drawing tools allow you to create and edit vector shapes. They make it easy to create various elements for web pages.

Create a new training file.

Click the left mouse button on the tool -shapes- on the toolbar, the tool selection window will open:

Here are the main shapes that we can use. Choose any and look at the options panel:

For any figure, you can choose:

  • drawing mode:
    • shape layer. The shape is created on a separate layer. A shape layer consists of a fill layer that defines the color of the shape, and an associated vector mask that defines the boundaries of the shape. The shape's borders are a path that appears in the Paths tab of the Layers panel.

    • contours. This mode allows you to draw outlines of shapes that can be filled or stroked with an arbitrary color. Paths appear on the Paths tab of the Layers panel.

    • Pixel fill. When working in this mode, not vector, but raster images are created, which can be processed in the same way as any raster image

  • style and color

  • set parameters specific to this figure

Draw rectangles

Let's choose the first shape - a rectangle. On the panel, select the mode - layer-shape. Select a style by clicking on the triangle on the right.

Choose whichever you like. By the way, if you click on the triangle in the circle (on the right), you can select additional styles in the context menu that opens. If you do not want to use a style, then select a white square with a red line through it.

Now you can set the geometric parameters:

  • Arbitrarily- as you draw, so be it.
  • Square- when stretching the shape with the mouse, the width and height will always be the same.
  • Specified size- you can set the width and height of the rectangle (in cm) and click on the canvas. A rectangle with the specified dimensions will appear.
  • Set aspect ratio- you can set how many times the width will be less (or more) than the height. When stretching the figure, the proportion will be preserved.
  • From the center- draws a rectangle from the center.
  • Snap to pixels- rectangle edges snap to pixel borders.
Now select -arbitrarily- and drag your rectangle on the canvas with the mouse. For example, here is what I got when using the Button, Glass Buttons and Web Styles styles.

Quite a useful tool for creating buttons and menus for your web pages, isn't it?

Draw rectangles with rounded corners

Let's select the second shape - a rectangle with rounded corners. On the panel, select the mode - the layer-shape, the corner radius - for example, 15 and the color (you can style it as you like). The geometric parameters are the same as for the rectangle.

Here's what I got with various combinations of radius and style.

Why not news blocks and menu buttons?

Draw circles

Let's choose the third figure - an ellipse. On the panel, select the mode - shape layer, color and style. The geometric parameters are the same as for a rectangle, with the only difference being that a circle can be chosen instead of a square. Select -arbitrary- and stretch the ellipse. If you want it to be a circle, then hold down the Shift key or select -circle- in the geometric parameters.

Here's what happened to me:

Draw polygons

Let's choose a shape - a polygon. On the panel, select the mode - layer-shape, the number of sides in the range from 3 to 100 (for example, 3 - for a triangle, 6 - for a hexagon), color and style. Consider the geometric parameters:

  • Radius is the radius of the polygon.
  • Smooth outer corners
  • Star- with the checkbox unchecked, the polygon is convex, with the checkbox checked, the polygon is concave.
  • Beam depth- if the polygon is concave, then its vertices, as it were, form rays. This parameter shows how much of the polygon's radius will be occupied by rays. The higher the %, the longer and sharper the rays.
  • Smooth outer corners- with unchecked the corners are sharp; with a tick, the corners are rounded.
For example:

The first nonagon has a radius of 3 cm, the rest of the boxes are unchecked.

The second nonagon has a radius of 3 cm, the checkmark is -star-, the depth of the rays is 25%, the rest of the checkboxes are unchecked.

The third nonagon has a radius of 3 cm, the depth of the rays is 50%, all the checkboxes are checked.

All have a style applied.

Draw lines

Let's choose a figure - lines. On the panel, select the mode - layer-shape, line thickness (in pixels), color and style. Consider the geometric parameters:

If all the checkboxes are cleared, it will be just a line, the parameters set the arrows at the ends of this line.

  • Start- arrow at the beginning of the line.
  • End- arrow at the end of the line.
  • Width- proportions of the arrow as a percentage of the line thickness (from 10% to 1000%).
  • Length- proportions of the arrow as a percentage of the line thickness (from 10% to 5000%).
  • Curvature- determines the degree of curvature of the widest part of the arrow in the place where it meets the line (from -50% to +50%).
For example:

The first line is unchecked, width - 500%, length - 1000%, thickness - 2 pixels.

The second line has everything the same, but there is a tick at -beginning- and curvature - 5%.

The third line has everything the same, but the -end- checkbox is ticked and the -beginning- checkbox is unchecked.

The fourth line has both checkboxes, width - 500%, length - 1000%, curvature - 15%, thickness - 5 pixels.

All have a style applied.

Draw arbitrary shapes

Let's choose a figure - an arbitrary figure. On the panel, select the mode - shape layer, color and style. The geometric parameters are the same as for a rectangle. But here there is a choice of the figure itself:

If you click on the triangle in the circle (on the right), you can select additional shapes in the context menu that opens.

Draw multiple shapes on one layer

The principle here is the same as with the rectangular selection tools (in the first lesson, we made a non-standard selection area using the tools on the options bar: add to selection, subtract from selection, etc.). The same tools are available in the Shapes Options bar.

For example, create a rectangle shape, now in the options bar click on the "add to shape area" icon, and now select an ellipse shape. Move the mouse cursor to the upper border of our rectangle, press the left mouse button and, without releasing, stretch the ellipse. It should look something like this:

If the ellipse is not stretched as you would like, you can fix it. To do this, take the tool -outline selection- on the toolbar:

Move the cursor to the border of the ellipse and, holding down the left mouse button, drag the ellipse where it should be. Using all these tools, you can draw shapes of varying complexity.

Save Shapes

Let's say we liked the last shape we created and want to use it in the future. To do this, you need to save it. For this menu Edit -> Define Custom Shape. Give a name to the new shape.

Now our shape has appeared in the drop-down panel for selecting arbitrary shapes.

This lesson is over. Next time we'll focus on paths and bitmaps.

We talked about painting in Photoshop with a pencil and brush. Freehand lines are great, but it often happens that you need to depict an even geometric figure. Rulers and compasses are gone, and now you can do it with simple editor tools.

To select one of them, on the tool palette, click the Shapes icon.

Regardless of which group tool you select, the following elements, common to all shapes, will appear on the options bar.

  • Selection tool mode. Here you can choose one of three.
  1. Figure. The value is set by default, and with it a vector geometric figure is created on a separate layer, that is, what you expect from the tool happens.
  2. Circuit. The outline of the shape is drawn without a fill.
  3. Pixels. It creates not a vector, but a raster figure.
  • Fill. Allows you to set the color and type (gradient, shading) of the drawn shape.
  • Stroke. Shape outline settings: thickness, type, color.
  • Width and height. They allow you to clarify the size of the figure, when it is not permissible to do this “by eye”.

As always, create a new document with a white background. You can leave the rest of the options as default or choose your own.

Rectangle

Select the Rectangle shape and to draw it, click on the canvas and then move the pointer while holding down the mouse button. The point where you clicked will be the corner of the shape.

On the options bar, click the icon. The geometry settings window will open.

By default, the switch is set to Rectangle. If you set it to Square, then when you draw, you will always get a shape with the same side length. You can achieve the same effect without clicking the checkbox: to get a square while drawing a rectangle, just hold down the Shift key.

If the parameters of your rectangle are known in advance, set the switch to the Specified size position and enter the required values ​​in the fields. The shape will be completely drawn as soon as you click on the canvas with the mouse button.

After setting the switch to the Set proportions position in the input fields that have become available, you can specify the aspect ratio of the created figure.

The From Center check box allows you to draw a rectangle from the center, rather than from an extreme point.

Rectangle with rounded corners

The next item in the list of geometric shapes. It is clear that it differs from the usual rounding at the corners. Accordingly, the settings for this shape and the rectangle are almost identical. The rounding radius can be specified in the corresponding field of the options bar.

Ellipse

The parameters are the same as a rectangle, but instead of a square, you can draw a circle. To do this, in the geometry settings window, check the box in the Circle position, or while drawing, hold down the Shift key.

Polygon

With this tool, you can draw a triangle, a dodecahedron, an icosahedron, a star, or in general any figure that contains from three to a hundred sides. Their number can be set in the Sides input field located on the options panel.

The geometric settings window differs markedly from the previous figures.

  • Radius. This field specifies the radius of the future polygon.
  • Smooth out outer corners. If the checkbox is checked, then the corners are rounded; if not, the corners are sharp, as in a classic polygon.
  • Star. Check the box if you want to get a star at the output.
  • Ray depth. This input field specifies how long the rays will be.
  • Smooth out inner corners. Check this box if you want the inner corners to be rounded, as shown in the image below.

Line

Use this tool to create really straight lines - it's just not practical to draw them by hand. To achieve maximum accuracy, adjust the geometric parameters in the corresponding window.

  • Start. If the checkbox is checked, instead of a line, you will get an arrow that will be drawn at the point where you clicked the mouse button.
  • End. Check the box to add an arrow to the end of the line.
  • Width. It is specified as a percentage in relation to the thickness (it can be set on the options panel in the field of the same name).
  • Length. It is considered in the same way as the width - in relation to the thickness, as a percentage.
  • Curvature. The value is specified in the range from -50% to 50% and determines how much the widest part of the arrow will be bent. The figure shows arrows with a curvature of 0%, 30% and 50% (from top to bottom).

Arbitrary figure

In order not to create their own tool for each of the dozens of remaining figures, the developers have combined them here. All elements of the options panel are already familiar to you, except for the most important one - the Shape button, clicking on which opens the shape selection window.

If you click on the gear located on the right side of the window, a menu of additional options will open, containing categories of shapes.

Thanks to the tools discussed, you can literally draw a huge number of shapes in two clicks, which would take quite a long time to create manually.

Making a rectangle in Photoshop is a fairly simple task that even a beginner can do. I advise you to learn how to draw this simple shape, as this skill can be useful for you to perform many tasks. Be it website design, photo frame or image correction. Despite the seemingly large size of the lesson, you will cope with this task in just a few minutes.

I'll show you several ways to draw a rectangle, all of which you'll ever need.

Let's start with shapes. We create a new document. 1000 by 1000 pixels will be enough.

Now go to the toolbar and look for the rectangle tool.


Holding down the right mouse button, we draw over the working field.



The rectangle is ready! To get rid of the thin black border, rasterize the layer. Rasterization can be found in the layers window.


Now the second way. Selected area.

On the top panel, look for the “Layers” tab and create a new one.


Now it's time to get acquainted with one of the most popular tools in Photoshop - the selected area, which is located at the top of the side toolbar.


We draw on the working field by holding the right mouse button.


A selected area has formed, which we must fill. So let's move on to the "Select Primary Color" tool. By clicking on it, we open the color map and choose any shade that we like.

We are looking for the Fill tool, select it and click on the selected area.



And now the key combination ctrl + d and the selection is removed! The rectangle is ready!



The third method will teach us how to draw a transparent triangle in Photoshop, which is often used as a photo frame. It's just as easy to draw. Create a new layer, select a rectangular selection and place it on the workspace. In general, we perform all of the above actions.


And now we will stroke the selected area, for which we go to the top panel and click on the "Editing" tab. We are interested in the Stroke command.


As you can see, a dialog box has appeared, prompting us to select the line thickness, stroke color, and frame location. Set the parameters to your taste or choose mine.


Press the key combination ctrl + d to remove the selection and enjoy the result.

As you can see, we have a full-fledged frame in the form of a transparent triangle.


We have already learned how to make a rectangle in Photoshop. Let's learn how to edit it! For example, let's try to change the color and size.


As you may have noticed, I recommended that you create a new layer to draw the rectangle. And this is no accident. Your rectangle is not anchored to the workspace. You can edit it to your heart's content, while the workspace will remain unchanged. I want to warn you that these methods are applicable to a rectangle created by any of the above methods.

First, let's try to change the color. Again, there are several methods. The first is the fill tool. Choose the color you want from the toolbar. Then click on the fill tool. And after already on our rectangle.

The rectangle was yellow, but became green. Very simple, don't you think?


The second way is overlay options. In the horse of the word, we look for the desired one and click on it with the left mouse button.


In the dialog box that appears, check the box next to Color Overlay. Click on the box filled with color and choose the one you like.


There are many ways to change the color of a rectangle. But you can very well limit yourself to two main ones.

Now let's learn how to size the rectangle.


Resizing a rectangle in Photoshop is extremely easy. Select the Move tool and click on the rectangle.



By dragging the corner with the mouse, you can change its size. And also flip along the axis.



Similar articles