Graphics subsystem

The Stock Viewer uses the Graphics subsystem to put stock information into a visual form.

Several drawing objects, or drawers, draw the graph axes, axis marks, and labels. Inside the axes, price drawer and volume drawing objects draw representations of the stock information. (A drawer knows its value, and a graph object knows where that value belongs.)


The TStandardGraph class is the basic graph type. It holds a collection of drawing objects and helps them with data-point to visual-point conversion.

The TGraphRange object specifies a range of values on the graph (GraphValue), such as the range of price units on the y-axis.

TStandardGraph derives from MGraphic. It takes care of mapping data points to points that can be displayed. For instance, if a drawer needs to draw something at (0,0) the graph could translate (0,0) to (104,38) so that it can be displayed at the right location in a view.

TGraphDrawer is the abstract base class for objects that display data in a graph. Derived classes override DrawIntoGraph to draw their data.

TAxisDrawer, TBarDrawer, TMarkDrawer, TLabelDrawer and TTitleDrawer all derive from TGraphDrawer. TAxisDrawer draws the x- and y-axes for the graph. TBarDrawer displays a bar chart for a collection of GraphValues. TMarkDrawer is an abstract class for displaying tick-marks at certain intervals along an axis. TXMarkDrawer and TYMarkDrawer implement behavior specific to drawing those marks for the x- or y-axis. TLabelDrawer is an abstract class for displaying labels at certain intervals along an axis. TXLabelDrawer and TYLabelDrawer implement behavior specific to drawing those labels for the x- or y-axis. TTitleDrawer displays a title aligned with either the x- or y-axis.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker