IDLgrPalette

A palette object represents a color lookup table that maps indices to red, green, and blue values.

Superclasses

This class has no superclass.

Subclasses

This class has no subclasses.

Creation

See IDLgrPalette::Init

Methods

Intrinsic Methods

This class has this following methods:


IDLgrPalette::Cleanup

The IDLgrPalette:: Cleanup procedure method performs all cleanup on the object. IDLgrPalette is described above.

Calling Sequence

OBJ_DESTROY, Obj

or

Obj -> [IDLgrPalette::] Cleanup                               ( In a subclass' Cleanup method only .)

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrPalette::GetRGB

The IDLgrPalette:: GetRGB function method returns the RGB values contained in the palette at the given index. The returned value is a three-element vector of the form [red, green, blue]. IDLgrPalette is described above.

Calling Sequence

Result = Obj -> [IDLgrPalette::] GetRGB( Index )

Arguments

Index

The index whose RGB values are desired. This value should be in the range of 0  £  Index  < N_COLORS, where N_COLORS is the number of elements in the color palette, as returned by the N_COLORS keyword to the IDLgrPalette:GetProperty method.

Keywords

There are no keywords for this method.


IDLgrPalette::GetProperty

The IDLgrPalette:: GetProperty procedure method retrieves the value of a property or group of properties for the palette. IDLgrPalette is described above.

Calling Sequence

Obj -> [IDLgrPalette::] GetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrPalette::Init

ALL

Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the properties associated with the state of this object. State information about the object includes things like color, range, tick direction, etc., but not image, vertex, or connectivity data, or user values.

BOTTOM_STRETCH

Set this keyword to return the current bottom stretch value of the palette. This value is in the range of 0 £ Value £ 100.

GAMMA

Set this keyword to return the current gamma value of the palette. This value is in the range of 0.1 £ Value £ 10.0.

N_COLORS

Set this keyword to return the number of elements in the color palette.

TOP_STRETCH

Set this keyword to return the current top stretch value of the palette. This value is in the range of 0 £ Value £ 100.


IDLgrPalette::Init

The IDLgrPalette:: Init function method initializes a palette object. IDLgrPalette is described above.

Calling Sequence

Obj = OBJ_NEW('IDLgrPalette', [aRed , aGreen , aBlue] )

or

Result = Obj -> [IDLgrPalette::] Init( [aRed , aGreen , aBlue] )
( In a subclass' Init method only .)

Arguments

aRed

A vector containing the red values for the color palette. These values should be within the range of 0 £ Value £ 255. The number of elements comprising the aRed vector must not exceed 256.

aGreen

A vector containing the green values for the color palette. These values should be within the range of 0 £ Value £ 255. The number of elements comprising the aGreen vector must not exceed 256.

aBlue

A vector containing the blue values for the color palette. These values should be within the range of 0  £  Value  £  255. The number of elements comprising the aBlue vector must not exceed 256.

Keywords

Properties retrievable via IDLgrPalette::GetProperty

BLUE_VALUES (Get, Set)

A vector containing the blue values for the color palette. Setting this value is the same as specifying the aBlue argument to the IDLgrPalette::Init method.

BOTTOM_STRETCH (Get, Set)

Set this keyword equal to the bottom parameter for stretching the colors in the palette. This value must be in the range of 0  £   Value   £  100. The default value is 0.

GAMMA (Get, Set)

Set this keyword to the gamma value to be applied to the color palette. This value should be in the range of 0.1  £  Gamma   £  10.0. The default is 1.0.

GREEN_VALUES (Get, Set)

A vector containing the green values for the color palette. Setting this value is the same as specifying the aGreen argument to the IDLgrPalette::Init method.

NAME (Get, Set)

Set this keyword equal to a string containing the name associated with this object. The default is the null string, ' '.

RED_VALUES (Get, Set)

A vector containing the red values for the color palette. Setting this value is the same as specifying the aRed argument to the IDLgrPalette::Init method.

TOP_STRETCH (Get, Set)

Set this keyword equal to the top parameter for stretching the colors in the palette. This value must be in the range of 0  £  Value  £  100. The default value is 100.

UVALUE (Get, Set)

Set this keyword to a value of any type. You can use this "user value" to contain any information you wish. Remember that if you set the user value equal to a pointer or object reference, you should destroy the pointer or object reference explicitly when destroying the object it is a user value of.


IDLgrPalette::LoadCT

The IDLgrPalette:: LoadCT procedure method loads one of the IDL predefined color tables into an IDLgrPalette object. IDLgrPalette is described above.

Calling Sequence

Obj -> [IDLgrPalette::] LoadCT, TableNum

Arguments

TableNum

The number of the pre-defined IDL color table to load, from 0 to 40.

Keywords

FILE

Set this keyword to the name of a colortable file to be used instead of the file colors1.tbl in the IDL distribution. The MODIFYCT procedure can be used to create and modify colortable files.


IDLgrPalette::NearestColor

The IDLgrPalette:: NearestColor function method returns the index of the color in the palette that best matches the given RGB values. IDLgrPalette is described above.

Calling Sequence

Result = Obj -> [IDLgrPalette::] NearestColor( Red , Green , Blue )

Arguments

Red

The red value of the color that should be matched. This value should be within the range of 0 £ Value £ 255.

Green

The green value of the color that should be matched. This value should be within the range of 0 £ Value £ 255.

Blue

The blue value of the color that should be matched. This value should be within the range of 0 £ Value £ 255.

Keywords

There are no keywords for this method.


IDLgrPalette::SetRGB

The IDLgrPalette:: SetRGB procedure method sets the color values at a specified index in the palette to the specified Red, Green and Blue values. IDLgrPalette is described above.

Calling Sequence

Obj -> [IDLgrPalette::] SetRGB, Index , Red , Green , Blue

Arguments

Index

The index within the Palette object to be set. This value should be in the range of 0  £   Value  < N_COLORS.

Red

The red value to set in the color palette.

Green

The green value to set in the color palette.

Blue

The blue value to set in the color palette.

Keywords

There are no keywords for this method.


IDLgrPalette::SetProperty

The IDLgrPalette:: SetProperty procedure method sets the value of a property or group of properties for the palette. IDLgrPalette is described above.

Calling Sequence

Obj -> [IDLgrPalette::] SetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrPalette::Init