IDLgrLegend Properties
IDLgrLegend objects have the following properties in addition to properties inherited from any superclasses. Properties with the word "Yes" in the "Get" column of the property table can be retrieved via IDLgrLegend::GetProperty. Properties with the word "Yes" in the "Init" column of the property table can be set via IDLgrLegend::Init. Properties with the word "Yes" in the "Set" column in the property table can be set via IDLgrLegend::SetProperty.
Note
For a discussion of the property description tables shown below, see About Object Property Descriptions.
Objects of this class have the following properties.
In addition, objects of this class inherit:
ALL
An anonymous structure containing the values of all of the retrievable properties associated with this object.
BORDER_GAP
A floating-point value to indicate the amount of blank space to be placed around the outside of the glyphs and text items. The units for this property are fractions of the legend label font height. The default is 0.1 (10% of the label font height).
COLUMNS
An integer value to indicate the number of columns the legend items should be displayed in. The default is one column.
FILL_COLOR
The color to be used to fill the legend background box. The color may be specified as a color lookup table index or as a three-element vector [red, green, blue]. The default is [255,255,255].
FONT
An object reference to an instance of an IDLgrFont object class that describes the font to use to draw the legend labels. The default is 12 point Helvetica.
Note
If the default font is in use, retrieving the value of the FONT property (using the GetProperty method) will return a font object that will be destroyed when this legend object is destroyed, leaving a dangling object reference.
Note
Objects specified via this property are not automatically cleaned up when the IDLgrLegend object is destroyed.
GAP
A floating-point value that indicates the amount of blank space to be placed vertically between each legend item. The units for this property are fractions of the legend label font height. The default is 0.1 (10% of the label font height). The same gap is placed horizontally between the legend glyph and the legend text string.
GLYPH_WIDTH
A floating-point value to indicate the width of the glyphs, measured as a fraction of the font height. The default is 0.8 (80% of the font height).
HIDE
A Boolean value that indicates whether this object should be drawn:
ITEM_COLOR
An array of colors defining the color of each item. The array defines M different colors, and should be either of the form [3,M] or [M]. In the first case, the three values are used as an RGB triplet, in the second case, the single value is used as a color index value. The default color is [0,0,0].
ITEM_LINESTYLE
An integer array of integers defining the style of the line to be drawn if the TYPE property is set to zero. The array can be of the form [M] or [2,M]. The first form selects the linestyle for each legend item from the predefined defaults. To use a pre-defined line style, set this property equal to one of the following integer values:
| 0 |
Solid line (the default) |
| 1 |
Dotted |
| 2 |
Dashed |
| 3 |
Dash dot |
| 4 |
Dash dot dot dot |
| 5 |
Long dash |
| 6 |
No line drawn |
The second form specifies the stippling pattern explicitly for each legend item (see the LINESTYLE property to IDLgrPolyline::Init for details).
ITEM_NAME
An string array representing the names of items in the legend.
Specifying this property is the same as specifying the optional aItemNames argument to the IDLgrLegend::Init method.
ITEM_OBJECT
An array of object references of type IDLgrSymbol or IDLgrPattern that represents the shapes of the items in the legend. A symbol object is drawn only if the TYPE property is set to zero. A pattern object is used when drawing the color patch if the TYPE property is set to one. The default object is the NULL object.
Note
If one or more IDlgrSymbol object references are provided, the SIZE property of those objects may be modified by this legend to suit its layout needs.
Note
Objects specified via this property are not automatically cleaned up when the IDLgrLegend object is destroyed.
| Property Type |
Object reference array |
||
| Name String |
not displayed |
||
| Get: Yes |
Set: Yes |
Init: Yes |
Registered: No |
ITEM_THICK
A floating-point array of floating-point values that define the thickness of each item line, in points, where each element is a value between 1.0 and 10.0. Out-of-range values are quietly clamped to the allowed range. This property is only used if the TYPE property is set to zero. The default is 1.0 points.
ITEM_TYPE
An integer array that defines the type of glyph to be displayed for each item:
OUTLINE_COLOR
The color to be used to draw the legend outline box. The color may be specified as a color lookup table index or as a three-element vector [red, green, blue]. The default is [0,0,0].
OUTLINE_THICK
A floating-point value between 1.0 and 10.0 that defines the thickness of the outline frame, in points. Out-of-range values are quietly clamped to the allowed range. The default is 1.0 points.
PARENT
An object reference to the object that contains this legend.
RECOMPUTE
A Boolean value that determines whether to recompute the legend dimensions when the legend is redrawn.
SHOW_FILL
A Boolean value that indicates whether the background should be filled with a color:
SHOW_OUTLINE
A Boolean value indicating whether the outline box should be displayed:
TEXT_COLOR
The color to be used to draw the legend item text. The color may be specified as a color lookup table index or as a three-element vector [red, green, blue]. The default is [0,0,0].
TITLE
An object reference to an instance of the IDLgrText object class to specify the title for the legend. The default is the null object, specifying that no title is drawn. The title will be centered at the top of the legend, even if the text object itself has an associated location.
Note
Objects specified via this property are not automatically cleaned up when the IDLgrLegend object is destroyed.
XCOORD_CONV
A floating-point vector, [s0, s1], of scaling factors used to convert X coordinates from data units to normalized units. The formula for the conversion is as follows:
NormalizedX = s0 + s1 * DataX
Recommended values are:
[(-Xmin)/(Xmax-Xmin), 1/(Xmax-Xmin)]
The default is [0.0, 1.0]. IDL converts, maintains, and returns this data as double-precision floating-point.
| Property Type |
Floating-point vector |
||
| Name String |
not displayed |
||
| Get: Yes |
Set: Yes |
Init: Yes |
Registered: No |
XRANGE
A two-element double-precision floating-point vector of the form [xmin, xmax] that specifies the range of the X data coordinates covered by the legend.
| Property Type |
Floating-point vector |
||
| Name String |
not displayed |
||
| Get: Yes |
Set: No |
Init: No |
Registered: No |
YCOORD_CONV
A floating-point vector, [s0, s1], of scaling factors that convert Y coordinates from data units to normalized units. The formula for the conversion is as follows:
NormalizedY = s0 + s1 * DataY
Recommended values are:
[(-Ymin)/(Ymax-Ymin), 1/(Ymax-Ymin)]
The default is [0.0, 1.0]. IDL converts, maintains, and returns this data as double-precision floating-point.
| Property Type |
Floating-point vector |
||
| Name String |
not displayed |
||
| Get: Yes |
Set: Yes |
Init: Yes |
Registered: No |
YRANGE
A two-element double-precision floating-point vector of the form [ymin, ymax] that specifies the range of the Y data coordinates covered by the legend.
| Property Type |
Floating-point vector |
||
| Name String |
not displayed |
||
| Get: Yes |
Set: No |
Init: No |
Registered: No |
ZCOORD_CONV
A floating-point vector, [s0, s1], of scaling factors that convert Z coordinates from data units to normalized units. The formula for the conversion is as follows:
NormalizedZ = s0 + s1 * DataZ
Recommended values are:
[(-Zmin)/(Zmax-Zmin), 1/(Zmax-Zmin)]
The default is [0.0, 1.0]. IDL converts, maintains, and returns this data as double-precision floating-point.
| Property Type |
Floating-point vector |
||
| Name String |
not displayed |
||
| Get: Yes |
Set: Yes |
Init: Yes |
Registered: No |
ZRANGE
A two-element double-precision floating-point vector of the form [zmin, zmax] that specifies the range of the Z data coordinates covered by the legend.
Note
Until the legend is drawn to the destination object, the [XYZ]RANGE properties will be zero. Use the ComputeDimensions method on the legend object to get the data dimensions of the legend prior to a draw operation.
| Property Type |
Floating-point vector |
||
| Name String |
not displayed |
||
| Get: Yes |
Set: No |
Init: No |
Registered: No |