List of diagram / image editors for Delphi - delphi

I need a good diagram / image editor for a Delphi application. I need the ability to place an image in the editor, and use freely positioned balloons / tips to describe parts of the image. The result must be exported as an image.
So far, I have evaluated KSDev Block Engine and TMS Diagram studio but am not completely satisfied with both of them. The former seems to have lots of little quirks and bugs and both of them don't seem to be able to export their content as an image (PNG with alpha channels is required).
Are there any other editors you know of that I might evaluate ?

There are two free components that I know of and have evaluated for a very limited period.
1) drawobjects by Angus Johnson # http://angusj.com/delphi/
2) simple graph from the delphiarrea site.
If I remember correctly both have the ability to export to an image format but I do not recall if they support png with alpha.
Regards
jo
PS sorry the anti spam does not allow me to post the link for the second pack and since I hate any kind of sign in just to answer a question my email and name are fake. This is the last time I am going to visit this site. I do understand the need to keep the spammers out but I can't accept any one to assume that I am a spammer. BB everyone.

Have also a look at:
- TeeTree from steema.com
- TCad from codeidea.com

Related

Delphi histogram component?

Does it happen that no one ever needs histogram in Delphi ?
Google gave me a bunch of half-baked code snippets. But it means that each time you need one - you have to invent one more ad hoc bycicle.
Torry mostly told me about some very expensive closed source Math Statistics or Financial packages, that as a subproduct have histograms. But they are very expensive and since you have no source code, each time you install update onto IDE/RTL/VCL you're probably screwed, until the vendor would make (soon ? ever?) updated packages. Given thatvendor is still does exists.
S.O. told me nothing, nil.
For what i found...
Mitov.com provides some histograms in PlotLab. which told to be free for non-commercial. Alas, it is again closed-source, and if the Histogram - quite fancy let's admit -is the onlything i need from it - why pay the whole price ?
One more example http://DSpatial.sf.net
Just few years ago i used it in Delphi 5, but even then i felt the author is loosing interest in the project. I made few enhancement, fixed some bugs, he merged them and that's all. The component was not very useful and lacked upon features, yet better than nothing. Now the project seems to be completely dead. Good old days, etc. But i do not want them back :-)
And Stack Overflow seemingly carries no single question about it. But maybe just no one bothered to create topic, after search found nothing ? I mean, Delphi was created for database access, histograms are one of basic ways to visualize data, and no one crosses them ? Something with nice style, with rich mouse tooltip like in HTML/CSS/JS on http://www.moskva.fm/stations/FM_95.2 ?
Or is this too domain-related and not ever possible to have good abstraction ?
TChart is a control that ships with most versions of Delphi. TChart can be used to make histograms (bar charts) in style. The following give you some ideas about how to use it: http://www.digitalcoding.com/tutorials/delphi/Simple-steps-to-create-Delphi-chart.html and http://delphi.about.com/od/adptips2006/qt/chart_selectbar.htm .
If you need something with code, google the pages at delphiforfun.org/programs/oscilloscope.htm . These are not controls. The oscilloscope article has a histogram with source. Some of the other projects at the site have other histogram graphs with source..not elegant but useful and free. Use them as a template to make your own control.
The link at http://delphiforfun.org/programs/Math_Topics/probability_distributions.htm shows how to make your own statistics displays with "histograms." This example makes use of TChart.
Here is some more stuff to try I found looking at my resource file:
http://wiki.lazarus.freepascal.org/TAChart, http://members.home.nl/mvanwesten/en_lazarus.html , http://www.martinole.org/TAChart.html ...some of these are GPU components that supposedly work with some versions of Delphi. Perhaps this is your lucky day as there is some source code. The first and third listed probably will work reasonably for histograms. You may have to write your own statistics algorithms.
Found this thread while doing some searching. The ImageEn component suite has a THistogramBox component. It's the NOT prettiest thing in the world, but it's the only one I've found so far.
http://www.imageen.com
I came across a histogram example in a gdiplus package available for download from code central. I don't know if it will do what you need but when I saw it I remembered your SO question.
HTH.
If you were using firemonkey, you could just created a series of TRectangles in series. They can be made unclickable by turning hittest off. Or is that too easy and straightforward?

Best tools [practices] for printing annotated image (TPicture) based documents from Delphi

It seems that most Delphi applications fit into two classes: Database-centric Applications that use Reporting Systems for all their printing needs, and applications that don't need printing.
For those in the excluded middle (non-database printing, non-reporting system), there are components to help out. For example, I have been a Developer Express "Express Printing System" customer since early on in that product's life cycle. For printing out any component (grid, spreadsheet,etc) that is also a Developer Express Printing System component to help me out.
So far so good. What I'm looking for is an alternative way (in Delphi 2010) to generate one or two page printouts that contain, typically:
Titles, and Headings
Page Headers and Page Footers
Ability to include a large picture which is the primary thing on the page. In this case, the picture (bitmap) is a chart custom drawn by me.
100% bulletproof output quality on every version of windows known to human kind, with every kind of printer known to human kind.
[UPDATE: I was previously having bizarre glitches with Developer Express printing components on color laser printers, which I am now quite hopeful I can sort out. ] ... Still I think it would be wise to look at other printing components out there so my "toolbox" of possible solutions for my current and future projects can include a simple reliable way of generating printer pages.
So I could really use suggestions. I am biased against Reporting Systems, even Code Based ones, but I am considering fast reports even though my use for it would be far from the typical use-case scenarios. There are no row and column data-sets involved in my printed pages.
Update/Final: It looks like FastReports is great. It can easily transfer any data from in memory in your application (such as an Image), to the current report page(s), like this:
procedure TForm2.Button1Click(Sender: TObject);
var
pic:TfrxPictureView;
begin
pic := frxReport1.FindObject('Picture1') as TfrxPictureView;
pic.Picture.Assign(Image1.Picture);
frxReport1.ShowReport;
frxReport1.Print;
end;
Fast Report is suited my needs very well. They even have a scripting system. You could try if is good enough for you.
http://fast-report.com/en/
I have been using the HtmlViewer component from www.pbear.com for all my printing solutions.
You have to create an html page (or two pagews) of course, but once you can do that, you can do anything you like (or at least what the html standard supplies). The HtmlViewer has a preview window so that can be used as a generic 'report' viewer and it can print the output immediatly.
You will be amazed what you can do with html, and it is easy to change the 'report' because it's just plain html.
If you should go that way, I will be happy to assist you in any question you might have. The component is free since a couple of years. So that could be an easy and inexpensive solution to your problem.

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 starting 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.
Sample manipulating of "Maps and Figures"
Sample of how to create, select and move components at runtime (in this case with TImage).
- Select shapes visually: Shows different ways to select shapes visually.
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.

Does anyone know resources for LaTex

I want to use LaTex to write equations faster and if it is possible to export the result as a png or jpg so that it can be used on a website.
Wikipedia (and its opensource wiki engine) uses LaTeX for that, maybe there are some resources available (at least in the code, as it is opensource).
Your question is very broad. You could start with Amazon's List of Latex Books.
You might want to investigate the StackExchange site mathoverflow.net solution - you can read about here. It uses jsMath which supports a lot of LaTeX syntax.
Assuming you already know a little LateX and your primary goal is to get images, a good high-level tool is mathTeX; there are even public servers that will convert to images for you.
If you want to do everything yourself, all the tools use dvipng at bottom.
I like both MathBin.net and Roger's Online Equation Editor. The latter lets you control the quality of the output. See also this question.
try this: http://hausheer.osola.com/latex2png
Here is a small symbol reference for LaTeX. If you are looking for something more as a general introduction, you can look at "The Not So Short Introduction To LaTeX2e". If you use Inkscape, there is built in support for rendering LaTeX and there are also extensions that do the same. You can read some commentary about it here. There are also things like LaTeX to HTML converters; However, at the time I was looking at them, they were somewhat limited in what formulas they could display.
I taught myself LaTeX using the wikibook. It's fairly comprehensive as an initial guide. I've since bought The LaTeX Companion, which is a more advanced guide to in depth typesetting in LaTeX
I use http://www.artofproblemsolving.com/LaTeX/AoPS_L_TeXer.php when I need a quick equation for a web site.
There are packages that will automatically produce images from LaTeX source, but these are often either buggy or used incorrectly. Many people install them on their blogs, for example, and the images show up if you visit the blog directly but they don't show up if you view the page via a blog reader. I'm not saying these problems can't be fixed. They can, but it often takes a few tries.
I prefer just to make a gif and stick it in the page. It's low tech and reliable.
One more tip: it's a good idea to put the LaTeX source in the alt tag of the image. This helps people using screen readers. It helps you too if you need to modify the equation later.
Detextify is a great site that lets you draw a symbol, and it will pop up a list of latex commands that may match your drawing. It's quite accurate! http://detexify.kirelabs.org/classify.html

Where should I begin when building a component?

I am looking to build my own component and have no idea where to begin. I have some Delphi books but they are old and outdated, and am looking for some recommendations on tutorials/books to help me do this. The component will be pretty simple, basically 2 labels and an image. I need hundreds of these in an array, so I thought a component would be the best route. The text will adjust based on width etc, and have some mouseover events. So basically, where do I begin?
I am using Delphi 2009, this will be a win32 app.
Thanks!
You can order Ray Konopka's book Dev. Custom Delphi 3 Components - PDF for 25$. It's a specialized book on the subject and very good for a beginner too.
The main principles behind developing components is:
Whether the component is visual or
not (Does it need a Canvas to paint on)
Does it need a window handle or not (visual or non-visual)
Once you answered those questions you can look at Delphi's source code for examples.
As far as I know, Delphi Component Design, by Danny Thorpe, is still the best book on the subject. Component design hasn't changed significantly in the last 15 years, so whatever books you have probably aren't as outdated as you think. There are three things to keep in mind while reading older references:
Names of certain units have changed. There's no DsgnIDE anymore, for example. It's DesignIDE instead.
Design-time code is strictly separated from run-time code now. This means you can't use DesignIDE in your component's unit, or else you're barred from using run-time packages. Older Delphi versions didn't have this technical restriction (although it's always been a legal restriction), so old code examples you find might need to change a little bit.
Strings are Unicode now, so as with all old code examples you find, there might be some invalid assumptions about character sizes that you'll need to recognize.
The biggest obstacle to writing components is that you're expected to use various protected members of the classes you descend from, but those frequently aren't documented, so you'll have to be much more willing to go read the VCL source code for examples of how various methods are used.
The easiest way to do what you want is to create a new form. Drop the labels and image and arrange them the way you want; if it suits your need, put them on a panel so they can be moved around as a unit.
Select all the components you want included (and including the panel if you chose to use one), and then click the Component item on the IDE's main menu, and select the "Create Component Template". (It's only enabled if you have selected components on the current form.) A dialog will appear asking you for a name for the new component, and the Component Palette page on which you want it to appear.
Take a look at this article, which describes how to build new components made up of a group of existing components.
Don't worry about your books being old.
Just about everything from the old days still works fine and what little doesn't is generally due to name conflicts or the addition of Unicode in the 2009 version.
They aren't Microsoft, they don't go breaking old code without good reason. In fact, take some code from the old DOS days--assuming it doesn't try to manipulate the screen it's likely to run with minimal fixup.
Don't worry about your old books! Since v3, Delphi hasn't changed much. This is why most of the programs compiled with D3 still compiles in D7 or even newer versions. And if it doesn't compile, probably you need to change a line or two, here and then.
I would recommend you to search other VERY simple components on Internet and see how they are made. Then make your own and post it here. Let other take a look at it and suggest improvements or spot bugs.
About your control's design:
1) maybe you DON'T need those two labels. You can just paint the text directly on the image. If you have lots of those components as you say, you may save a little bit of memory.
2) you may NOT want to have lots and lots and lots of images loading in one form. The overhead may be significant. What you can do is to load the pictures ONLY in images that are visible on screen - and you will put on screen ONLY 5-10 images (or whatever number of images you can show on the form without going out of screen). As the user scrolls down, you keep the same same TImage controls on screen but you load new (next) images in them.
3) You may not want to store labels and TImage in an array (I suppose it is an TImage because it seems you want to show them on the screen else you won't need labels - you need to explain your problem in more details if I got it wrong). But you can store a TBitmap and the text (that you want to display in labels) instead.
So, you may need to calculate how much CPU/disk overhead your hundreds of controls will create and how much memory they need. If you stay well under 1GB and the loading time is under 10 seconds, then it is relatively ok. IF not, you may want to think about your control's design before starting to actually implement it.
Hope this was helpful.
See ya.

Resources