Identify from points |
Top Previous Next |
/* Identify from points */ / * ============================*/ #include "moskito.h"/* is everything in it */
/* SYSidentifyCoordinate delivers the co-ordinates of the bases, of her from the user lie in the plan identified co-ordinate most near. SYSgetCoordinate delivers the low-spirited key and the co-ordinates in the plan. About flags the approach of the routines can be steered. */ long int EXPORTENTRY Punkte_identifizieren (int argc, char* argv [], PROOT root) { PIOPIPES pipes = DBgetIOpipes (root); stand in xpos, ypos;/* Stuetzpktkoordinaten */ stand in ori_xpos, ori_ypos;/* real co-ordinates */ T_PPOINT *points = ZERO; ULONG flags1, flags2; int iRetValue; int iTaste = 0;
flags1 = SYS_COORD_MARK_IDENTIFIED/* mark place */ | SYS_COORD_MARKER/* own mark */ | SYS_COORD_RETURN_KEY/* low-spirited key */ | SYS_COORD_RETURN_ORIGINAL_COORDS/* digit. Co-ordinates */ | SYS_COORD_NO_MESSAGE_TEXT/* no announcements */ ; IOwprintf (pipes, "SYSidentifyCoordinate:\n"); iRetValue = SYSidentifyCoordinate (root, &xpos, &ypos, points, flags1, DCgreenTriangle, &ori_xpos, &ori_ypos, &iTaste);
IOwprintf (pipes, ">co-ordinate: %3.4f, %3.4f\n" "->Original: %3.4f, %3.4f\n" "->Key: %d\n\n", xpos, ypos, ori_xpos, ori_ypos, iTaste);
flags2 = SYS_COORD_MARK_IDENTIFIED/* mark place */ | SYS_COORD_MARKER/* own mark */ | SYS_COORD_START_CLS/* auto. Integrate */ | SYS_COORD_RETURN_ORIGINAL_COORDS/* digit. Co-ordinates */ | SYS_COORD_NO_MESSAGE_TEXT/* no announcements */ ; IOwprintf (pipes, "SYSgetCoordinate:\n"); iRetValue = SYSgetCoordinate (root, &iTaste, &xpos, &ypos, flags2, DCblueSquare, &ori_xpos, &ori_ypos); if (LINK_CON == iTaste)/*, e.g., demolition of the user dialogue */;
IOwprintf (pipes, ">co-ordinate: %3.4f, %3.4f\n" "->Original: %3.4f, %3.4f\n" "->Key: %d\n\n", xpos, ypos, ori_xpos, ori_ypos, iTaste); //...
return iRetValue; } //Punkte_identifizieren /*---------------------------------------------------------------------------*/
|