>  Docs Center  >  Libraries  >  CATALYST  >  TAPEMEASURE__DEFINE

TAPEMEASURE__DEFINE

TAPEMEASURE__DEFINE

Name


      TAPEMEASURE__DEFINE

Purpose



      The purpose of this routine is to provide a tape measure that can be displayed
      in a direct graphics draw widget. Typically, the user drags a line between two
      points in an image and the distance is calculated using the coordinate system
      of the image (which is provided to the TapeMeasure.

Authors



        FANNING SOFTWARE CONSULTING BURRIDGE COMPUTING
        1645 Sheely Drive 18 The Green South
        Fort Collins Warborough, Oxon
        CO 80526 USA OX10 7DN, ENGLAND
        Phone: 970-221-0438 Phone: +44 (0)1865 858279
        E-mail: davidf@dfanning.com E-mail: davidb@burridgecomputing.co.uk

Category



      Objects.

Syntax



      tapeMeasureObject = Obj_New("TAPEMEASURE", X1=0.5, Y1=0.5, X2=0.75, Y2=0.75)
      drawObject -> Add, tapeMeasureObject

Superclasses



      SELECTABLEOBJECT
      CATDATAATOM
      CATATOM
      CATCONTAINER IDLITCOMPONENT
      IDL_CONTAINER

Class Structure



  class = { TAPEMEASURE, $
            format: "", $ ; The format of the measured length. Default: '(F8.2)'.
            headsize: 0L, $ ; The tape measure head size in pixels. By default !D.X_Size / 50.
            label: Obj_New(), $ ; A TextLine object for labeling the distance between two points.
            layerObject: Obj_New(), $ ; A CATLAYER object for holding the annotation.
            linestyle: 0L, $ ; The linestyle the tape measure is drawn in.
            midx: 0.0, $ ; The midpoint of the tape measure in X.
            midy: 0.0, $ ; The midpoint of the tape measure in Y.
            moveend: 0L, $ ; Indicates which end of tape measure (1 or 2) you are moving.
            orientation: 0.0, $ ; The orientation of the tape measure
            thickness: 0.0, $ ; The thickness of the tape measure.
            x1: 0.0, $ ; The X location for one end of the tape measure.
            y1: 0.0, $ ; The Y location for one end of the tape measure.
            x2: 0.0, $ ; The X location for the other end of the tape measure.
            y2: 0.0, $ ; The Y location for the other end of the tape measure.
            sx: 0L, $ ; The static end of a moving tape measure.
            sy: 0L, $ ; The static end of a moving tape measure.
            units: "", $ ; A string. Appended to length measurement when displaying. Null by default.
            userCoord: Obj_New(), $ ; A coordinate system provided by the user.
            INHERITS SelectableObject $
          }

Messages



  TAPEMEASURE_CHANGED: This message is sent whenever SetProperty method is called and the NOMESSAGE
                    keyword is NOT set.

Event Structure



      This object will add the following fields to the event structure created by an interaction.
      The fields are defined as:
      BOUNDARY_BOX: A 2x5 element array in normalized coordinates giving the boundary box of
                        the object.
      LENGTH: The current length of the tape measure in data coordinates.
      UNITS: A string that is the units of the length. Appended to length, usually.
      XPTS: A two element array giving the X endpoints of the line in data coordinates.
      YPTS: A two element array giving the Y endpoints of the line in data coordinates.

Modification History



      Written by: David W. Fanning, 25 Jan 2004.



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