Choosing the right class

Parent Previous Next

You might ask yourself which class to build on for your new tool. Here are some guidelines.

Though possible, you should not use this class as the base class as it tells nothing about what kind of figure you are aiming at. Instead choose one of the following:

If your figure should be capable of automatically resizing itself when its rectangle changes and the drawing algorithm uses standard gdi functions (like Line, Ellipse and so on), this is the right class to choose. It enables functionality that does the necessary handling of the Anchor and Endpoint, drawing direction and flipping.

If your figure will use a bitmap as the drawing source, choose this class. It introduces a Bitmap property and enables pixel manipulation. Resizing functionality is inherited from TDynamicFigure.

If your goal is to manipulate pixels of bitmapped objects this class is the right one. Manipulators are highly specialized, easy to use tools that create a symbiotic relationship between the manipulator and its target. (See Creating manipulators for more information about creating manipulators)

This is the foundation class for figures who's content defines a rectangle that cannot resize dynamically. The drawing implementation consists of arbitrary elements or points.

Use TPoly if your drawing is founded on lines between points. TPoly introduces the PolyPoint property and implements moving logic for the PolyPoint structure.

Note that a poly based figure has nothing to do with the technique you apply to draw your figure. A dynamic figure, for instance, can be, and often is, drawn by means polygonic points, but this does not make it a poly figure in our meaning of the word.