开发者

Draw and manipulate shapes at run time

What's the best way to draw shapes interactively at run time using Delphi? I need to be able to select, drag and resize the shapes. This will be used to mark up existing images and documents.

This looks like a good starti开发者_Python百科ng point, but I'm wondering if there's a more complete library (preferably free) available that will save some time.

Update:

If you're going with a custom solution from scratch, I've seen another example on Delphi Central that might be an even better starting point.


I will recommend you, read some links on my site. Are explained and all the source code is available; You can see and get some usefull for you.

  • Plugin system in Delphi - Part 2 Not directly what you need, is a plugin system for Delphi. But all the samples are based on a drawing tool that uses Shapes (Creating, selecting, resizing). You can review the code and extract what you need.

    Draw and manipulate shapes at run time

  • Sample manipulating of "Maps and Figures" Sample of how to create, select and move components at runtime (in this case with TImage).

Draw and manipulate shapes at run time

- Select shapes visually: Shows different ways to select shapes visually.

Draw and manipulate shapes at run time

The web is in Spanish, but you can generate an authomatic translation on the web itself. Anyway the code is commented.

Regards.

Excuse-me for my bad english.


One freeware option would be TssControlSizer. Just change the "control" property to the control you want to manipulate resize/move.


Not sure if you've moved on now with this Bruce but if you haven't, it might be worth looking at TMS Components Diagram Studio - it's certainly cheap, and looks quite powerful from the demo.


I would use Flex Graphics (commercial, $499 for one developer, with sources, $1500 for site-license, with source code). When I bought it, it was a lot less than that. So I guess, I wouldn't pay that now. It's a lightweight 'drawing/cad' package.

But as I already own it, I could import a page from the original document as an image, perhaps rendered in PNG or WMF, and then mark it up with lines, etc.

You could think of it as a light "cad" package. It has most primitive shapes, and you can easily create your own new objects or shapes in Delphi classes, that could be "smart shapes" like the ones in Visio.

http://www.flex-graphics.com/

Another commercial component set that I have heard only good things about is TRichView. They have a TRichViewEdit that looks like you could emulate a document markup environment easily with it.


Please check here: TCAD -2d graphics component for delphi http://www.codeidea.com wish can help you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜