Click here to Skip to main content
Licence CPOL
First Posted 25 Jun 2007
Views 21,205
Downloads 418
Bookmarked 23 times

A Free Draw Library: Easy to Snap/zoom/undo/redo/copy/paste

By | 4 Jul 2007 | Article
A free draw you can use my example to do

Introduction

In this article, I introduce a draw library I wrote. It is easy to use for drawing shapes and managing shapes. It provides common features, such as zoom/undo/redo/copy/paste, and I provide a sample of how to use it.

Draw

Background

A good draw can help us to solve some problems. For example, maybe you want a draw tool to get the max position and min position when you view the audio wave or other wave. I got the idea when I analyzed voice two years ago. So I wrote a draw library.

Using the Code

You can build my example and run it. I have provided a release version and a debug version. Also, I provided another demo that uses my draw library. All classes:

class CRTObject
class CRTShape
class CRTLine 
....... Other shapes
class CRTAction
class CRTAddAction 
class CRTModifyAction 
class CRTRemoveAction
class CRTTool
class CRTDrawTool
class CRTLineTool 
...... Other DrawTools
class CRTViewTool 
class CRTModifyTool
class CRTSelectTool 
class CRTRemoveTool
class CRTDrawView 
class CRTDrawDoc 
class CRTObjectsList
class CRTShapesList
class CRTDataMgr 
class CRTViewEnv 
class CRTDrawParam 
class CRTClipboard 
class CRTDC
class CRTMath 
class RTPoint 
class RTRect 
class RTSize

You can use CRTViewTool to zoom, use CRTActionMgr to do undo/redo and use CRTClipboard to do copy/cut/paste. I will continue to add some features and some classes. I am glad and happy if you tell me you use my draw library. And I will tell you how to use it if you need my help. The source code is not public, but the library is free and you can use it. In the ZIP package, there is an RTDemon application. You can download the latest version here: RTDemon.zip.You can also download the latest RTDesktopDraw ZIP file. There are some bugs in RTDraw. I will fix them and improve the reliability and stability of RTDraw.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

realtang

Web Developer

China China

Member

the Realtang Webmaster of www.realtang.com

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionCould you public all the code? Pinmembercoldcat21:57 18 May '10  
GeneralMy vote of 1 PinmemberOctopod11:06 28 Aug '09  
QuestionWhere is the source code of the library? Pinmemberli000017:12 26 Jun '07  
AnswerRe: Where is the source code of the library? Pinmemberrealtang17:46 26 Jun '07  
GeneralRe: Where is the source code of the library? PinPopularmemberKochise5:40 27 Jun '07  
GeneralGreat work! Pinmemberkellyonlyone3:35 26 Jun '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 5 Jul 2007
Article Copyright 2007 by realtang
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid