| CEMAPiGetRect Method |
Returns the coordinates of a user selected box starting at a corner.
Available since Oasis montaj version: 5.0.0
Limitations: May not be available if running outside of a Oasis Montaj or from a command line program.
License: Available to anyone.
Namespace: Geosoft.Desktop.GXNetAssembly: geosoft.desktop.gxnet (in geosoft.desktop.gxnet.dll)
Notes
The coordinates are returned in the current User projection
(See GetUserIPJ_MVIEW and SetUserIPJ_MVIEW.)
If the user IPJ distorts the coordinates from being rectilinear
(e.g. for a TriPlot graph), then care should be taken since the
(Xmin, Ymin) and (Xmax, Ymax) values returned do not necessarily
correspond to the lower-left and upper-right corners. In fact, the
returned values are calculated by taking the starting (fixed) corner
and the tracked (opposite) corner, and finding the min and max for
X and Y among these two points. With a warped User projection, those
two corner locations could easily be (Xmin, Ymax) and (Xmax, Ymin).
This becomes quite important if you want to use the rectangle for a
masking operation, because the "other" two corner's coordinates may
need to be constructed based on a knowledge of the User projection,
and may not be directly obtained from the returned X and Y min and
max values. What appears to be a rectangle as seen on the map is not
necessarily a rectangle in the User coordinates.
Syntax public int iGetRect(
string str1,
ref double d2,
ref double d3,
ref double d4,
ref double d5
)
Public Function iGetRect (
str1 As String,
ByRef d2 As Double,
ByRef d3 As Double,
ByRef d4 As Double,
ByRef d5 As Double
) As Integer
public:
int iGetRect(
String^ str1,
double% d2,
double% d3,
double% d4,
double% d5
)
member iGetRect :
str1 : string *
d2 : float byref *
d3 : float byref *
d4 : float byref *
d5 : float byref -> int
Parameters
- str1
- Type: SystemString
user prompt string - d2
- Type: SystemDouble
X minimum in current view user units. (defines corner) - d3
- Type: SystemDouble
Y - d4
- Type: SystemDouble
X maximum - d5
- Type: SystemDouble
Y
Return Value
Type:
Int32
0 if point returned.
1 if user cancelled.
See Also