 | CEMAPiGetRect Method |
Returns the coordinates of a user selected box starting at a corner.
Namespace:
Geosoft.Desktop.GXNetX
Assembly:
geosoft.desktop.gxnetx (in geosoft.desktop.gxnetx.dll) Version: 2024.2.0.25
Syntaxpublic int iGetRect(
string str_val,
ref double min_x,
ref double min_y,
ref double max_x,
ref double max_y
)
public int iGetRect(
string str_val,
ref double min_x,
ref double min_y,
ref double max_x,
ref double max_y
)
Public Function iGetRect (
str_val As String,
ByRef min_x As Double,
ByRef min_y As Double,
ByRef max_x As Double,
ByRef max_y As Double
) As Integer
Public Function iGetRect (
str_val As String,
ByRef min_x As Double,
ByRef min_y As Double,
ByRef max_x As Double,
ByRef max_y As Double
) As Integer
public:
int iGetRect(
String^ str_val,
double% min_x,
double% min_y,
double% max_x,
double% max_y
)
public:
int iGetRect(
String^ str_val,
double% min_x,
double% min_y,
double% max_x,
double% max_y
)
member iGetRect :
str_val : string *
min_x : float byref *
min_y : float byref *
max_x : float byref *
max_y : float byref -> int
member iGetRect :
str_val : string *
min_x : float byref *
min_y : float byref *
max_x : float byref *
max_y : float byref -> int
Parameters
- str_val
- Type: SystemString
User prompt string - min_x
- Type: SystemDouble
X minimum in current view user units. (defines corner) - min_y
- Type: SystemDouble
Y - max_x
- Type: SystemDouble
X maximum - max_y
- Type: SystemDouble
Y
Return Value
Type:
Int32
0 if point returned.
1 if user cancelled.
Remarks
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.
See Also