MGHGRCOLORPOLYGON__DEFINE
Class Name
MGHgrColorPolygon
Purpose
This class implements a colour plane using an IDLgrPolygon. For a description
of what a colour plane is, see the documentation for MGHgrColorPlane.
Properties
The following properties are supported (amongst others):
DEFAULT_COLOR (Init,Get,Set)
The colour (indexed or RGB) of the surface, used if the
COLOR_VALUES property is not set.
COLOR_VALUES (Init,Get,Set)
A 2-D array of byte values representing the indexed colours of
the cells (STYLE=0) or vertices (STYLE=1).
DATAX, DATAY (Init,Get,Set)
1-D or 2-D arrays specifying the vertex positions. When
retrieved via GetProperty, DATAX & DATAY are always 2-D.
MISSING_POINTS (Init,Get,Set)
A 2-D array of integer or byte values specifying which cell
(STYLE=0) or vertex (STYLE=1) values are deemed to be
missing. For STYLE=0, missing cells are omitted from the
polygon; for STYLE=1, the cells adjacent to each missing
vertex are omitted.
PALETTE (Init,Get,Set)
A reference to the palette defining the byte-color mapping.
STYLE (Init,Get,Set)
An integer specifying whether colours are uniform over the
cells (STYLE=0) or interpolated from the vertices
(STYLE=1). Default is 0. If STYLE is changed without
specifying new geometry (DATAX, DATAY, COLOR_VALUES or
MISSING_POINTS) then the colour plane is resized and shifted
in such a way as to keep the notional data points (i.e the
cell centres for STYLE=0 and the vertices for STYLE=1) in the
same location.
XRANGE, YRANGE, ZRANGE (Get)
ZVALUE (Init,Get,Set)
Position in the Z direction.
###########################################################################
This software is provided subject to the following conditions:
1. NIWA makes no representations or warranties regarding the
accuracy of the software, the use to which the software may
be put or the results to be obtained from the use of the
software. Accordingly NIWA accepts no liability for any loss
or damage (whether direct of indirect) incurred by any person
through the use of or reliance on the software.
2. NIWA is to be acknowledged as the original author of the
software where the software is used or presented in any form.
###########################################################################
Modification History
Mark Hadfield, 1998-12:
Written as MGHgrColorPlane (I think).
Mark Hadfield, 2000-12:
Renamed MGHgrColorPolygon.
Mark Hadfield, 2001-10:
- Updated for IDL 5.5: keyword inheritance modified.
- The code now handles the case where MISSING_POINTS is
specified and is everywhere > 0 (i.e. no polygons to
display).
Mark Hadfield, 2002-07:
- The STYLE property can now be set via SetProperty.
- Vectorised and simplified code in SetPolygon method.
Mark Hadfield, 2004-07:
- Property handling modified to support property-sheet
functionality.
- IDL 6.0 syntax.