BOX__DEFINE Name
BOX__DEFINE Purpose
The purpose of this routine is to provide a rectangle or box that can be displayed
in a direct graphics draw widget. The coordinate system of the Box
object is either passed to it (a CatCoord object) or is a normalized
coordinate system by default.
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
boxObject = Obj_New("BOX", X1=0.5, Y1=0.5, X2=0.75, Y2=0.75)
drawObject -> Add, boxObject
Superclasses
SELECTABLEOBJECT
CATDATAATOM
CATATOM
CATCONTAINER IDLITCOMPONENT
IDL_CONTAINER Class Structure
class = { BOX, $
clip_to_data: 0B, $ ; Flag that if set will allow clipping to data range in DRAW method.
layerObject: Obj_New(), $ ; A CATLAYER object for holding the annotation.
linestyle: 0L, $ ; The line style of the box.
midx: 0.0, $ ; The midpoint of the box in X.
midy: 0.0, $ ; The midpoint of the box in Y.
modemap: Obj_New(), $ ; A pixmap for calculating "mode".
moveend: 0L, $ ; Indicates which end of box you are moving.
thickness: 0.0, $ ; The thickness of the box.
x1: 0.0, $ ; The X location for lower-left corner of the box.
y1: 0.0, $ ; The Y location for lower-left corner of the box.
x2: 0.0, $ ; The X location for upper-right corner of the box.
y2: 0.0, $ ; The Y location for upper-right corner of the box.
sx: 0L, $ ; The static X location.
sy: 0L, $ ; The static Y location.
INHERITS SelectableObject $
}
Messages
BOX_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.
XPTS: A two element array giving the X values of the lower-left and upper-right
corners of the box in data coordinates.
YPTS: A two element array giving the Y values of the lower-left and upper-right
corners of the box in data coordinates.
Modification History
Written by: David W. Fanning, 25 Jan 2004.
Added ability to draw box on map with MAPCOORD object. 14 June 2009. DWF.