>  Docs Center  >  Libraries  >  Coyote  >  HCOLORBAR__DEFINE
Libraries

HCOLORBAR__DEFINE

HCOLORBAR__DEFINE

Name


      HCOLORBAR

Filename



      hcolorbar__define.pro
;

Purpose



      The purpose of this program is to create a horizontal
      colorbar object to be used in conjunction with other
      IDL 5 graphics objects.

Author



      FANNING SOFTWARE CONSULTING
      David Fanning, Ph.D.
      1645 Sheely Drive
      Fort Collins, CO 80526 USA
      Phone: 970-221-0438
      E-mail: david@idlcoyote.com
      Coyote's Guide to IDL Programming: http://www.idlcoyote.com/

Category



      Object Graphics.

Calling Sequence



      thisColorBar = Obj_New('HColorBar')

Required Inputs



      None.
  INIT METHOD KEYWORD PARAMETERS:
      COLOR: A three-element array representing the RGB values of a color
          for the colorbar axes and annotation. The default value is
          white: [255,255,255].
      FONTSIZE: A floating value that is the point size of the font
          used for the axis and title annotations. Set to 8 point by default.
      NAME: The name associated with this object.
      NCOLORS: The number of colors associated with the colorbar. The
          default is 256.
      MAJOR: The number of major tick divisions on the colorbar axes.
          The default is 5.
      MINOR: The number of minor tick marks on the colorbar axes.
          The default is 4.
      PALETTE: A palette object for the colorbar. The default palette
          is a gray-scale palette object.
      POSITION: A four-element array specifying the position of the
          colorbar in normalized coordinate space. The default position
          is [0.10, 0.90, 0.90, 0.95].
      RANGE: The range associated with the colorbar axis. The default
          is [0, NCOLORS].
      TITLE: A string containing a title for the colorbar axis
          annotation. The default is a null string.
  OTHER METHODS:
      Clamp (Procedure): Given a two-element array in the data range of
          the colorbar, the colorbar image is clamped to this range. In
          other words, the range of colors is clamped to the specified
          range. Values above or below the range in the colorbar are set to
          the minimum and maximum range values, respectively.
      GetProperty (Procedure): Returns colorbar properties in keyword
          parameters as defined for the INIT method. Keywords allowed are:
              COLOR
              MAJOR
              MINOR

Name


              PALETTE
              POSITION
              RANGE
              TEXT
              TITLE
              TRANSFORM
      SetProperty (Procedure): Sets colorbar properties in keyword
          parameters as defined for the INIT method. Keywords allowed are:
              COLOR
              MAJOR
              MINOR

Name


              PALETTE
              POSITION
              RANGE
              TEXT
              TITLE
              TRANSFORM

Side Effects



      A HColorBar structure is created. The colorbar INHERITS IDLgrMODEL.
      Thus, all IDLgrMODEL methods and keywords can also be used. It is
      the model that is selected in a selection event, since the SELECT_TARGET
      keyword is set for the model.

Restrictions



      Requires FSC_NORMALIZE from Coyote Library:
        http://www.idlcoyote.com/programs/fsc_normalize.pro

Example



      To create a colorbar object and add it to a plot view object, type:
      thisColorBarObject = Obj_New('HColorBar')
      plotView->Add, thisColorBarObject
      plotWindow->Draw, plotView

Modification History



      Written by David Fanning, from VColorBar code, 20 Sept 98. DWF.
      Changed a reference to _Ref_Extra to _Extra. 27 Sept 98. DWF.
      Fixed bug when adding a text object via the TEXT keyword. 9 May 99. DWF.
      Fixed the same bug when getting the text using the TEXT keyword. :-( 16 Aug 2000. DWF.
      Fixed a bug with getting the text object via the TEXT keyword. 16 Aug 2000. DWF.
      Added the TRANSFORM keyword to GetProperty and SetProperty methods. 16 Aug 2000. DWF.
      Added RECOMPUTE_DIMENSIONS=2 to text objects. 16 Aug 2000. DWF.
      Added a polygon object around the image object. This allows rotation in 3D space. 16 Aug 2000. DWF.
      Removed TEXT keyword (which was never used) and improved documentation. 15 AUG 2001. DWF.
      Added ENABLE_FORMATTING keyword to title objects. 22 October 2001. DWF.
      Added a CLAMP method. 18 November 2001. DWF.
      Forgot to pass extra keywords along to the text widget. As a result, you couldn't
          format tick labels, etc. Fixed this. Any keywords appropriate for IDLgrTick objects
          are now available. 26 June 2002. DWF.
      Fixed a problem with POSITION keyword in SetProperty method. 23 May 2003. DWF.
      Fixed a problem with setting RANGE keyword in SetProperty method. 6 Sept 2003. DWF.
      Removed NORMALIZE from source code. 19 November 2005. DWF.
      Font sizes have changed. Now using a 12 point font. 6 May 2011. DWF.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us