Shape drawing tool

Log-in or register.

Shape drawing tool

rsrc/shape-tool.png image SHAPE is a drawing tool capable of drawing arbitrary filled shapes and/or shape outlines. The outline is defined by a series of vertices with tangents.

How to use the Shape tool

A new shape is created by defining at least 2 vertices. A vertex is added by clicking an optionally moving the mouse while keeping the button pressed. A simple click adds a sharp vertex (with zero tangents) while a click+drag creates a smooth vertex with the forward tangent defined by the dragging part (backward tangent has the same size, but opposite direction).

When used in a vector layer, objects created with some of the other tools can be converted to Shapes via the "Convert to Shape" command in the "Object" menu.

The Shape tool, unlike other tools, can react to mouse clicks differently depending on its current state. Initially, it responds to all mouse clicks by adding new vertices. After right-clicking and selecting "End sub-path" from context menu, the interpretation of mouse actions changes. Instead of adding new points, the shape can now be moved by dragging it or, if clicked out of the shape, a different object may be selected (in a vector layer) or the shape is applied (in a raster layer).

A shape can be modified via the control handles. There are 3 kinds of handles (+ optional handles depending on current fill style). The azure handles represent and control positions of vertices. The brown handles control the tangents at each vertex. Green handles represent the segments between two vertices and can be used to split the segment by inserting a new vertex.

There are several commands accessible from the context menu. Right-click on the canvas or on individual vertices to display the commands. These commands allow deleting a vertex, smoothing a vertex, replacing a segment with line or arc or mirroring the shape along one of its line segments.

Shape supports all shape-fill modes: it is capable of drawing filled shape, shape outline or combination thereof. The outline if drawn with primary color, while the interior uses the active fill style.

When used in a raster layer, Shape can be combined with many meta-tools (select, stylize, eraser) to achieve various effects.

Shape tool video tutorial

Narration transcript

How to use the Shape tool in RealWorld Paint.

The shape tool can be used in both vector layer and raster layer. Using it in a vector layer is better, because you can adjust the shape at any time.

Select the Shape tool and click a few times. Now, instead of simple clicking, press the mouse button and move the mouse a bit before releasing it. Play with it for a while. Simple clicks create sharp corners while press-move-release actions result in smooth transitions through the clicked point.
Note how the line between a green point and your mouse indicates, where the next vertex will be placed in the shape.

Look at the control handles - there are three colors. The blue ones are placed, where you clicked. Try moving them around. Then there are the brownish ones - they control tangents at the vertices. Moving them affects the arcs between two blue points. The green ones are special - they represent the arcs and allow you to split them.

Right-click and choose "End sub-path" from the context menu. The line following your mouse disappears and further clicks will not add vertices to this shape. Instead, you can move the drawn shape or scale and rotate it if you press and hold SHIFT key. Clicking on empty space will start a whole new shape.

What if you want to add more vertices to your shape? There are multiple ways. You can for example right-click one of the green points and select "Add points here" and then start clicking as before. You can run this command at any time to change the insertion point. A different approach with its own advantages and disadvantages is dragging the green control point. Note that it only moves on the arc between its two neighbor blue points. Once you release it, it splits the arc at the selected point without changing its shape.

Every shape may consist of multiple sub-paths. Select the "Start new sub-path" command and place a shape inside your existing shape. The interior path defines a hole. Observe what happens when the sub-paths intersect. This is something else than placing two separate shapes over each other.

Right-clicking brown vertices gives you the option to delete a tangent creating a sharp edge.

The green points have the most commands, but they are only shown when certain conditions are met. There is the "Replace with line" command and "Replace with arc" command. The later is only shown if it is possible to replace the arc with a close enough approximation of a ellipse arc. The last command is "Reflect shape" - it only appears if the green point lays on straight segment.

Do not forget that you can convert other objects to shape. Starting with a different tool and switching to Shape later can save you time.

Shapes can have their interior filled using any fill style and they may have outlines drawn by solid colors.

Now you now what are the capabilities of the Shape tool. Mastering it requires a bit of practice though. Don't give up!

Scripting parameters

SHAPE tool can be used from scripts. The command in script may have 2 or more vertices defined. Each vertex consists of 7 parameters:

  • type - "C" for normal vertex, "E" for last vertex in a sub-path.
  • positionX, positionY - coordinates of the vertex.
  • previousX, previousY - backward tangent direction.
  • nextX, nextY - forward tangent direction.


DrawTool.SHAPE(Document, "C", 50, 100, 0, -25, 0, 25, "E", 100, 100, 0, 25, 0, -25);

See also: DrawTool object, Document object

Recent comments

- show all comments
user icon Vlasta site administrator on July 11th 2013

Right click and select "End sub-path".

user icon Anonymous on February 14th 2014

i used to be able to mask with it, now i cant mask at all. Why is that

user icon Vlasta site administrator on February 14th 2014

Hard to say without more info. Maybe you are in a vector layer?

user icon Lanie registered user on May 3rd 2014

Why does the photo im tracing change dark so I can't see the photo? IE doing the tiger type tracing?

user icon Vlasta site administrator on May 3rd 2014

It should turn gray instead of dark. The gray tint indicates that the region is not selected. As your selection grows, more of the photo will be shown normally.

user icon Anonymous on March 19th 2015

Is there scripting? Cooool! Simple and for free.
Thanks to the author!

user icon Anonymous on January 22nd 2016

How do I rotate a shape? I can rotate a rectangle, but not if it is converted to a shape, for some reason...

user icon Vlasta site administrator on January 22nd 2016

Hold down SHIFT while clicking on a shape and dragging it. It will allow you to both rotate and scale a shape.

user icon Anonymous on February 15th

I can not find a "decompose objects" to separate fonts in text. Can you help me?

user icon Vlasta site administrator on February 15th

That function is only in the "latest" version downloadable via a small link on the main page.

user icon Anonymous
Vista & Win 7 icons
I wish there were...