DrawingBoard2 - A .Net GDI+ drawing component
- Posted: Jun 20, 2012 at 6:00 AM
- 8,771 Views
- 3 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
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...
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.
- 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;
- Cartesian Plane
- ImageBox : Importing image on canvas
- Pen : Has similar functionality as MS Paint Pencil , but points are movable
- Rich Text Box : Importing rich textbox content(RTF) on canvas
- Rounded Rectangle : Rectangle with rounded corners
- Simple TextBox
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;
Here's the sample running and me dropping a number of different shapes on it...
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...