The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Mask


Unit: SDL_rchart
Class: TContourPlot
Declaration: property Mask[ix, iy: integer]: byte;

The contour plot component has a built-in mechanism to mask parts of the plot. The mask is coupled to the pivot points; each mask element is a rectangular area around a pivot point, whose size is equal to the distance of the pivot points. The Mask may either be controlled by the array property Mask or, alternatively, during the redraw of the contour plot by adjusting the Mask parameter in the OnEstimateZVal event.

The Mask array is in fact an array of byte values and has always the size NumPivotsX by NumPivotsY. The value of a particular mask array cell controls the visibility of the area around the corresponding pivot point. A value of zero indicates a transparent mask cell, all other values result in non-transparent cells whose colors are determined by the corresponding mask value (which is treated as an index into the MaskPalette color array).

The following figure shows two masked areas. The position of the pivot points are indicated by small dots. The property NumPivotsX has been set to 21, the property NumPivotsY has been set to 12. The cells from [2,7] to [5,12] are covered by a blue mask, the cells from [15,3] to [18,11] are covered by a red mask.

Hint: A mask value of 255 has a special meaning: it causes the masked area to be drawn in inverted colors (instead of solid colors taken from the MaskPalette.



Last Update: 2016-May-10