2 DuckShot Toolbar

2.3 OCR

DuckShot Chapter2-35

DuckShot is using Tesseract engine to perform Optical Character Recognition (OCR). Currently, DuckShot supports OCR only in English.

DuckShot Chapter2-36

No specific setting is required to perform OCR. Simply snip the target area and press Start OCR button.

DuckShot Chapter2-37

DuckShot Chapter2-38

After OCR is done, result will be shown along with the confidence score. Confidence score (range from 0 to 1) is feedback from Tesseract engine to indicate how reliable the output data is. A score of 0.95 and above is ‘usually’ correct. Maximum OCR accuracy requires extensive trained data and well defined set of criteria under very specific conditions. DuckShot is designed to accommodate most common use cases therefore it is impossible for DuckShot to achieve high confidence score in all kind of scenarios. The reliability of the output result relies heavily on the quality and layout of the texts within the image. DuckShot always pre-process the image to improve the image quality before OCR. Nevertheless, it is recommended to always inspect your output before you take the result directly as it is.

The following is an example of less accurate output:

DuckShot Chapter2-39

Nevertheless, DuckShot OCR can still save you a lot of time and effort if you need to extract a lot of texts from an image. Just be sure to inspect the output result.

You can edit the result directly in its place holder. Press the Copy button to copy the result to clipboard so you can paste it somewhere else.

DuckShot Chapter2-40

2.4 Undo and Redo

DuckShot Chapter2-41

These two buttons are the Undo (left) and Redo (right) buttons. You may use hotkey combinations of CTRL + Z for undo operations and CTRL + Y for redo operations. Undo and redo are extremely handy features to reverse a mistake or restore any actions that were previously undone. They are particularly useful when you are creating and editing drawing objects. The buttons are disabled when there is no operation that can be undone or restored.

2.5 Basic Drawing Features

DuckShot has a set of simple yet comprehensive drawing tools built into the toolbar. Some of them shares the same functionality, like preset colors, custom colors, color picker, context menu, object sizing, positioning and reordering. We will go through these functionalities one by one in this chapter.

2.5.1 Positioning, Sizing and Navigating Through Objects

To draw an object:

  1. Press on the icon of the object you want to draw.

  2. Mouse over on any empty space on screen.

  3. Press down mouse left button.

  4. Drag the mouse to any direction to size the object.

  5. Release mouse left button to create the object.

DuckShot Chapter2-42


Object (except Text and Step Counter) will not be created if the mouse drag distance is lesser than 4 pixels. For Text and Step Counter objects, they will be created with default size at the point of mouse down.

To select an object:

  1. Mouse over the object you want to select.

  2. Object will be outlined.

  3. When multiple objects are staggered together, try to move your mouse until the object you want to select is outlined.

  4. Left mouse button down to select it. Selected object will have resize handles around it.

  5. The feature of the selected object will be selected and all of the drawing settings of the selected object is loaded automatically. Icon will also changes its appearance dynamically to reflect the changes.

  6. You can then move, resize or adjust the settings of object straight away from its current state.

DuckShot Chapter2-43


Any changes you made on the settings will apply directly to the currently selected object. To unselect an object, simply click on empty space on your screen.

To select multiple objects:

  1. Mouse over the object you want to select.

  2. Object will be outlined.

  3. While pressing CTRL key, left click the outlined object.

  4. Repeat step 1 – 3 to select as many objects as you want.

  5. The purposes of multi selection are:

    1. Move multiple objects together.

    2. Change drawing settings of multiple objects in one go.


You are allowed to select different types of drawing objects at the same time. However, when you change the settings of particular type of drawing objects, only objects of that type will change accordingly. You cannot resize, duplicate or delete multiple objects in one go. (Step Counter objects can be resized concurrently using another approach, more details on Chapter 2.12)

DuckShot Chapter2-44

2.5.2 Preset Colors and Color Picker

You can change color of freehand drawing pen, line, shape, text and step counter objects. These drawing tools share the same set of 10 preset colors. These preset colors are fixed and cannot be changed. On the other hand, there are 10 custom colors available to each of the drawing tool. These custom colors are NOT shared among drawing tools and each drawing tool can have its own set of custom colors. This is an intentional design because some drawing objects like filled rectangles are usually drawn with semi transparent colors (like a highlighter), while lines are normally drawn with stronger color tones.

DuckShot Chapter2-45

When a custom color is selected, HSB color control will expand and change its values accordingly. HSB stands for Hue-Saturation-Brightness, and it is a human friendly way to describe color.

Hue ranges from 0 to 360. Hue represents a color of the rainbow in a wheel.

Saturation ranges from 0 to 1. The higher the saturation, the richer the color is; the lower the saturation, the more grayish the color is.

Brightness also ranges from 0 to 1. When brightness is set to 1, color is pure white. When brightness is set to 0, color is pure black.

DuckShot has made HSB settings as user friendly as possible. Back color of HSB sliders are changed dynamically as you change any of the HSB value. Finding the color of your need has become an intuitive and enjoyable process. Besides HSB, you can change the alpha channel (A) to control color transparency. Alpha channel ranges from 50 to 255. Alpha value of 255 is fully opaque while 50 is very transparent. Duckshot does not allow alpha value below 50 because it is almost invisible and is meaningless in most use cases.


Any changes made on HSB color control will overwrite currently selected custom color immediately and cannot be undone.

Besides HSB color control, you can grab any color directly from your screen using Color Picker. Upon press on the Color Picker, your mouse cursor will change to an up pointing arrow and a magnifier window will show up. The Color Picker target is right at the tip of the up pointing arrow. Left click to select the color of that pixel on screen, or right click to cancel and close the Color Picker.

DuckShot Chapter2-46

DuckShot Chapter2-47

2.5.3 Slider Controls and Value Boxes

DuckShot uses a lot of slider controls. Sliders are excellent for quick selection of relative value within a range. This encourages a much quicker and easier workflow. However, sliders are not very good when user needs to define an exact value. To overcome this, DuckShot binds each slider control with another text box to hold the corresponding slider value. Notice that whenever the slider value changes, value in the text box changes as well. Same applies the other way round. This means user can define the exact value they want in the text box and the slider value will update accordingly as well.

These value boxes are always validated against user input. Whenever user inputs an unexpected value, text box will display the relevant error to user.

For example, when user keys in a value that is outside the range of the slider, text box will display the range values to user.

DuckShot Chapter2-48

If user keys in any character that is not a numeric while the settings was meant to hold only numeric value, text box will indicate such error to user.

DuckShot Chapter2-49

2.5.4 Context Menu

With context menu, you can reorder the Z index of drawing objects, duplicate or delete drawing object, edit text content, center snip region to either mouse cursor or any drawing object. You can bring out the context menu by right clicking on any drawing object or empty space on your screen. There is no need to select drawing object before right clicking on it. You know you are right clicking on the correct object when the object is outlined with your mouse hover over it. The availability of the context menu functions depends on what object you have right clicked.

When you right click on a drawing object that is not the front most, Bring to Front button will appear in the context menu. Pressing Bring to Front button will bring the object to the front most. After the object is brought to front most, Bring to Front button will disappear from the context menu until other object is brought to front most. In other words, Bring to Front button is available on any object that is not the front most.

DuckShot Chapter2-50

Likewise, when you right click on a drawing object that is not the bottom most, Send to Back button will appear in the context menu. Pressing Send to Back button will send the object to the bottom most. Send to Back button is available on any object that is not the bottom most.

DuckShot Chapter2-51

You can duplicate a drawing object by right clicking on it, select Copy Diagram then select Paste Diagram. Drawing object will be pasted at your mouse cursor position. You may use hotkey combinations of CTRL + C to copy and CTRL + V to paste the drawing object. You would need to select the drawing object before you can use the hotkeys.

DuckShot Chapter2-52

DuckShot Chapter2-53

To delete a drawing object, right click on it and select Delete. Or, you can select the drawing object then press the Delete key.

DuckShot Chapter2-54

There are 3 more text editing features specific for text objects. When text within Text object is highlighted, you can use Cut Text or Copy Text button to cut or copy the highlighted text. Or, you can use hotkey combinations of CTRL + X to cut or CTRL + C to copy the highlighted text. To paste text into Text object, select Paste Text or use hotkey combinations of CTRL + V to insert the text at where the cursor is.

DuckShot Chapter2-55

DuckShot Chapter2-56

DuckShot Chapter2-57

Lastly, you can instantly center the snip region to your cursor or any drawing object by selecting Center Snip Region in context menu. This is particularly handy when you use multiple displays so you do not have to drag move the snip region for a long distance.

DuckShot Chapter2-58


Notice that DuckShot may use same hotkey combinations for different features. However, the use cases will not conflict with each other. In fact, DuckShot purposely use the most common hotkey conventions so user does not get confused. For example, to copy stuff to clipboard, the normal hotkey conventions is CTRL + C. In DuckShot, when nothing is selected, CTRL + C would mean snip and copy image to clipboard. When a drawing object is selected, CTRL + C would mean copy the selected drawing object. When text is highlighted, CTRL + C would mean copy the highlighted text. Using the same hotkey combinations for different use cases actually improves the intuitiveness of workflow, user will not notice the subtle differences as compared to using a lot of different hotkey combinations.