Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  Motley  >  MGH_PICTURE_IS_FITTABLE

MGH_PICTURE_IS_FITTABLE

MGH_PICTURE_IS_FITTABLE

Name


  MGH_PICTURE_IS_FITTABLE

Purpose


  This function determines whether a picture has properties that
  allow its size to be determined explicitly. It optionally returns
  size information via the UNITS and DIMENSIONS keywords.
  "Picture" is my name for an IDL drawable object, ie an IDLgrView,
  IDLgrScene or IDLgrViewgroup.

Category


  Object graphics

Calling Sequence


  Result = MGH_PICTURE_IS_FITTABLE(picture, UNITS=units, DIMENSIONS=dimensions)

Positional Parameters


  picture (input, scalar object reference)
    A picture whose properties are to be queried

Keyword Parameters


  DIMENSIONS (output, 2-element floating)
    Dimensions for a rectangle enclosing the view(s) in the picture.
  N_VIEWS (output, scalar integer)
    Number of views contained in the picture.
  UNITS (output, scalar integer)
    Units for the DIMENSIONS. One of the criteria for a viewgroup to
    be fittable is that all views have the same units.
  VIEWS (output, object reference)
    An array of object references to the views contained in the picture

Return Value


  The function returns 1B if the picture is fittable, otherwise
  0B. The UNITS and DIMENSIONS keywords are given values iff the
  picture is fittable.

Dependencies


  Runs under IDL 5.1 or greater.

Example


  To fit window oWindow to view oView
  IDL> fittable = mgh_picture_is_fittable(oView, UNITS=units, DIMENSIONS=dimensions)
  IDL> if fittable then oWindow->SetProperty, UNITS=units, DIMENSIONS=dimensions
###########################################################################
  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-09:
    Written.
  Mark Hadfield, 2001-01:
    Added VIEWS keyword.
  Mark Hadfield, 2002-06:
    Moved code to get the view objects to a separate function,
    MGH_PICTURE_GET_VIEWS. I took this opportunity to enchance this code and it
    now handles IDLgrScene objects correctly.



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us