Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

DrawingBoard2 - A .Net GDI+ drawing component

The second project in our Diagraming week is one that I've wanted to highlight for a while.

Imagine you need a diagramming, or drawing board, component in your app, kind of like a mini-Visio. Yet you also want to extend it, add to it (i.e. you want the source). You want something that is vector based, where you can diagram programmatically or your users can interactively and the diagrams can be serialized as binary or XML.

Then you might want...

.NET GDI+ Drawing Component : DrawingBoard2

image

In one of my projects i have needed , a gdi+ drawing library for drawing simple geometrical shapes. So, I've found this graphical editor : KLONK Drawing Board . Its written in C# and GDI+ is used for drawing staff. It isn't a great component, but it was the most extensive open source project i 've found.It has many features , but it has no documentation and source code is a bit difficult to understand. I also couldn't find some shapes i need, such as Triangle . So , I've created my version , DrawingBoard2.

DrawingBoard2 is recomposed version of KLONK Drawing Board . A few features are also added.

DrawingBoard Features

  • Many 2D vector shapes
  • Zooming,Resizing,Dragging functionality
  • Serializing canvas in binary format. Enables user to save/load content of canvas

What's new in this version?
  • New polygon shapes are added : Triangles( Right triangle and , Equilateral triangle) , Hexagon, Pentagon, Trapezoid and other polygons.
  • Pie shape is added.
  • Table is added.
  • 3D Cube shape is added
  • Cartesian Plane shape is added
  • XML Serialization feature. Now shapes can be serialized/deserialized in XML format
  • Bitmap export. Now , drawing board can be exported as bitmap file.
  • Auto corner name feature is added for some shapes : Each corner of polygons/arc/pie will be named with alphabetic letters.
  • Source code is recomposed , and documented

List of all shapes are;

  • Arc
  • Cartesian Plane
  • Cube
  • Ellipse
  • Hexagon
  • ImageBox : Importing image on canvas
  • Line
  • Pentagon
  • Pie
  • Pen : Has similar functionality as MS Paint Pencil , but points are movable
  • Rectangle
  • Rich Text Box : Importing rich textbox content(RTF) on canvas
  • Rounded Rectangle : Rectangle with rounded corners
  • Simple TextBox
  • Star
  • Table
  • Trapezoid
  • Triangle

The downloads include the source for the component, a binary (DLL), documentation CHM and a working sample.

Here's a snap of the sample Solution, which compiled and ran for me without any issues;

imageimage

Here's the sample running and me dropping a number of different shapes on it...

SNAGHTML1371484b

SNAGHTML13723fb4SNAGHTML13729f02

Need a drawing board like component that's open source/source available? Need to learn how to build a like component? Then you need to check DrawingBoard2...

Tags:

Follow the Discussion

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.