SRP Sketch Control

SRPSketchYou may have seen the SRP Sketch Control in the wiki only to be disappointed that it was not documented. There was a good reason for that: we weren’t finished with it. This was a control originally built for a specific industry in mind and we needed to work it into a general control with more options. We are proud to officially release the control to our customers, fully documented of course.

The SRP Sketch Control is a utility control which allows users to sketch a diagram pertinent to their industry. For example, a company that builds parts can load up predefined sketches of their available components and users can then tweak or label them to meet specific needs.

The SRP Sketch Control makes it easy for users to sketch an idea. It is not a fully-fledged imaging system on the order of Photoshop. Its goal is to provide end users with efficient sketching and labelling. As a developer, you establish predefined labels and icons so users can rapidly identify important elements of their illustrations. Basic sketching functionality is available, from single lines to complex polygons with annotations.

Overview

The SRP Sketch Control creates a multilayered vector graphic that can be saved to the OpenInsight database and exported to various file formats for distribution or printing. The SRP Sketch Control is unique in that it is far more self-contained than other controls. Instead of creating a form and wiring up a bunch of buttons and events, the SRP Sketch Control contains all its own controls and has very few events at all. It’s a turnkey solution to meet the demands of specific industries.

As a developer, you will create a form that contains the SRP Sketch Control and do some work to set it up. Once the setup is established, the SRP Sketch Control will take care of the rest. When the user is ready to save, they will use the same save commands as the rest of your application, at which point you will read the control’s Data property and save it anywhere you wish. You will find this control to be one of the easiest to integrate into your application.

Inside the Sketch

While the ultimate goal of the SRP Sketch Control is to create a single image for printing or viewing, the sketch itself is a bit more complex. It consists of three layers: shapes, text, and icons.

Layers

This means that no matter what order you draw certain elements, Icons will always obscure both Shapes and Text, but shapes will never obscure text. Additionally, the text layer does something known as clipping. This is when the boundaries of the text “erase” everything beneath it. This makes labelling very readable as seen here:

TextClipping

The separation of layers makes diagram maintenance easier. When it comes time to export the diagram to a single image, the layers are composited and the image can then be used just about anywhere, including OIPI.

The User Experience

The SRP Sketch Control provides all the basic drawing capabilities expected from even the most rudimentary drawing applications. It supports various shapes, annotations, line styles, and unlimited undo/redo.

The toolbar and left hand panes are built in. The first pane is a general pane that provides easy access to the most common tasks.

The Draw Shape Tool

Perhaps the most interesting task the Draw Shape tool. It allows the user to sketch out a complex shape efficiently. The Draw Shape lets a user build a polygon line by line, like so:

SRP_Sketch_DrawShape

The blue line is the line that hasn’t been place yet. It’s just feedback so the user knows exactly how the line is going to look. There is a clever feature of this tool which allows the user to add curvature to the drawing. By holding down the control key, the user now sees this:

SRP_Sketch_DrawShape_Ctrl

Now the line is a quarter ellipse without the need to switch tools. This gives the user the capability of sketching out complex shapes very quickly.

SRP_Sketch_DrawShape_Complete

Once shapes are defined, they can be resized, reshaped, moved, copied, or deleted at will.

Labels

The SRP Sketch Control provides general multi-line text annotation with custom Font support. However, it can be horribly inefficient when a lot of industries have standard naming conventions. That why the control supports custom label panes. As the developer, you populate the panes with quick-n-ready labels that the user can just drop with a single click.

This saves the user a lot of time. It’s up to you to decide how the pane is populated. The easiest thing to do is just provide a fixed list of labels, but you can also provide a means for the user to customize the list, which you store in the database.

Icons

Like labels, there are times when Icons can be useful ways to identify certain aspects of a sketch. Add any number of icon panes so the user can drop them repeatedly as desired.

SRP_Sketch_Icons

Predrawn Objects

The control also supports a Predrawn Objects pane. Then the pane is enabled, new options open up to the user allowing them to save a selected set of shapes as a single object.

SRP_Sketch_Predrawn

The user names the object. Once the predrawn object is defined, the user can select it from the pane and drop it with a single click repeatedly. For example, you can create a predrawn object that represents a frequently used machinery component, or a special symbol on a map. The possibilities are endless.

Summary

As you can see, the SRP Sketch Control is fully featured. It requires very little setup and maintenance because the control’s features are self-contained within a fixed user interface. It won’t draw photorealistic landscapes or shiny logos. It will however give your application users the ability to very quickly create a useful visual diagram. Please give the control a try. As always, if you are a Pro control customer, then you now have this control at your disposal at no additional cost.

5 Responses to SRP Sketch Control

  • Chris Meyer says:

    Can a sketch be performed on top of an existing PDF file. I have clients who have house plans (PDF) and wish to add electrical details (icons & Lines), extract a Bill of Materials for quoting and print the final updated details.

  • krfournier
    krfournier says:

    Sadly, no. I get the sense you want to modify the PDF itself? Importing and exporting PDF is bit beyond the scope of a small project like this. I believe you can exactly those kinds of things with Adobe Acrobat or other PDF editing tools. At best, I could provide a way to import a large background graphic, but the sketch would ultimately be confined to image exports only.

    • Chris Meyer says:

      I was hoping to have the PDF as a background (house plan), then sketch (Icons & lines) with the help of a grid as a separate layer then print the PDF and sketch details on the one sheet and extract a list of icons used (BOM).

      • Don Bakke
        Don Bakke says:

        Chris, your idea has great merit. Even before the release of the control we discussed having an image as a background. Others have suggested similar interests. For instance, we have an ophthalmologist client who wants to pre-load a close-up image of an eye. The Sketch control would be used to circle and comment areas of interest. Background image support will likely be an enhancement before too long, but PDF document support is an unknown prospect right now. If I may ask, do you have access to the original imagery? I am just wondering why you could not work with the images (assuming we get that feature supported) and then just recreate the PDF file yourself.

        • Chris Meyer says:

          If I convert the PDF to an image format then I can that use as the background image. Any idea when the background image facility will be available?. I have several electrical clients who are very interested in the sketch function added to the OI database.

Leave a Reply

Subscribe to Blog

Enter your email address to sign up for email notifications of new posts.