SRGraphLabel Class Overview

Based upon the standard component class this component provides a powerful labeling feature to the Objective Chart kit. A single line of text may be displayed in any font and in any position on screen. Furthermore the text can be rotated into any orientation. This basic labeling component also has features built in to allow it to move in a pre-programmed direction in case of overlap with other labels.

Unlike the standard Windows text output system which always outputs text in relation to the top left hand corner of a line, the SRGraphLabel component has a location point system which allows the label to be positioned in relation to one of nine points. These points are situated at all four corners, in the centers of the four sides and in the very center of the label.

A label has a background, border and shadow feature just like the standard component. However if a label is oriented at 45 degrees from the normal horizontal base line the panel which it is placed upon will also be rotated, the edges lighted and the shadow placed in the correct relative positions.

Each label has a movement vector associated with it. This vector can be programmed to point in a particular direction. When the label is used as a member of a label block the SRGraphLabelBlock::Draw routine which handles the final output of the individual labels may detect the label overlapping another. When this occurs the label may either be removed or shifted in the direction dictated by the movement vector. In this way labels will never overlap. Note that separate and individual labels have no self-vectoring ability.