Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>obj_getpnt()</b> c_demo http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
OBJ_GETPNT()                                                        C_DEMO
   Retrieves information about a hot object into a Clipper array.

   Syntax
         nCount = OBJ_GETPNT(nIndex,aObjArray)

   Arguments
         nIndex      Number of object.
         nObjArray   Array to store object information. See the following
                     table for a listing of parameters returned in aObjArray.

   Returns
         nCount      Number of elements returned in the array. A -1 is
                     returned if OBJ_GETPNT() fails to find object.

   Description
         OBJ_GETPNT() returns the information within the nIndex object into
         the Clipper array aObjArray. nCount returns how many elements were
         written to the array. The size of the array can be determined with
         OBJ_ARRSIZ().
          +------------------------------------------------------------+
          |Parameters Returned in aObjArray                            |
          -------------------------------------------------------------|
          |Array element|Elements                                      |
          |-------------+----------------------------------------------|
          |     1       |Type of object                                |
          |             |----------------------------------------------|
          |             |1    |Box                                     |
          |             |2    |Polygon                                 |
          |             |3    |Line                                    |
          |             |4    |Polyline                                |
          |             |10   |Circle                                  |
          |             |11   |Ellipse                                 |
          |             |12   |Circle Arc                              |
          |             |13   |Ellipse Arc                             |
          |             |14   |Round Pie Slice                         |
          |             |15   |Oval Pie Slice                          |
          |             |16   |Round Closed Arc                        |
          |             |17   |Oval Closed Arc                         |
          |             |20   |Stroke or Bitmapped text                |
          --------------+----------------------------------------------|
          |     2       |Color of object (If marked-returns mark color)|
          |     3       |Object fill color                             |
          |             |  Sets the background for text objects        |
          |     4       |Pattern                                       |
          |     5       |Description                                   |
          |     6       |Next combined object                          |
          |     7-n     |Information about object that varies by type  |
          +------------------------------------------------------------+

         +--------------------------------------------------------------+
         |Other Parameters Returned in aObjArray                        |
         ---------------------------------------------------------------|
         |Type|Array|Elements                                           |
         |----+-----+---------------------------------------------------|
         |1,3 |7(N) |Starting X world coordinate                        |
         |    |8(N) |Starting Y world coordinate                        |
         |    |9(N) |Number of points (always 2)                        |
         |    |10(N)|Ending X world coordinate                          |
         |    |11(N)|Ending Y world coordinate                          |
         |    |12(N)|Drawing instruction (always 1)                     |
         -----+-----+---------------------------------------------------|
         |2,4 |7(N) |Starting X world coordinate                        |
         |    |8(N) |Starting Y world coordinate                        |
         |    |9(N) |Total number of points                             |
         |    |10(N)|Second X world coordinate                          |
         |    |11(N)|Second Y world coordinate                          |
         |    |12(N)|Drawing instruction repeating by 3 until...        |
         |    | (N) |Last X world coordinate                            |
         |    | (N) |Last Y world coordinate                            |
         |    | (N) |Drawing instruction                                |
         |    |     |---------------------------------------------------|
         |    |     |0    |Move, but do not plot                        |
         |    |     |1    |Move and plot                                |
         -----+-----+---------------------------------------------------|
         |10 -|7(N) |Center X world coordinate                          |
         | 17 |8(N) |Center Y world coordinate                          |
         |    |9(N) |X radius                                           |
         |    |10(N)|Y radius                                           |
         |    |11(N)|Arc start (0-3600)                                 |
         |    |12(N)|Arc width (0-3600)                                 |
         -----+-----+---------------------------------------------------|
         |20  |7(N) |X world coordinate                                 |
         |    |8(N) |Y world coordinate                                 |
         |    |9(N) |Justification                                      |
         |    |     |---------------------------------------------------|
         |    |     |0    |Start                                        |
         |    |     |1    |Center                                       |
         |    |     |2    |End                                          |
         |    |     |---------------------------------------------------|
         |    |10(N)|Registration                                       |
         |    |     |---------------------------------------------------|
         |    |     |0    |Top                                          |
         |    |     |1    |Baseline                                     |
         |    |     |2    |Center                                       |
         |    |     |3    |Bottom                                       |
         |    |     |---------------------------------------------------|
         |    |11(N)|Horizontal scale                                   |
         |    |12(N)|Vertical scale                                     |
         |    |     |---------------------------------------------------|
         |    |     |Bit   |1 (standard) to 4                           |
         |    |     |Fonts |                                            |
         |    |     |------+--------------------------------------------|
         |    |     |Stroke|1 (tiny) to 100                             |
         |    |     |Fonts |                                            |
         |    |     |---------------------------------------------------|
         |    |13(N)|Angle                                              |
         |    |     |---------------------------------------------------|
         |    |     |Bit   |1-4 (0 - 0, 1 - 90, 2 - 180, 3 - 270)       |
         |    |     |------+--------------------------------------------|
         |    |     |Stroke|0-3600 1/10th degrees                       |
         |    |     |---------------------------------------------------|
         |    |14(N)|Direction                                          |
         |    |     |---------------------------------------------------|
         |    |     |0    |Right to left                                |
         |    |     |1    |Left to right                                |
         |    |     |2    |Bottom to top                                |
         |    |     |3    |Top to bottom                                |
         |    |     |---------------------------------------------------|
         |    |15(N)|Text                                               |
         +--------------------------------------------------------------+

   Examples

         Displays information about hot object if line type -

         IF HOT_INFO() > 0
            DECLARE ret_array[OBJ_ARRSIZ()]
            OBJ_GETPNT(obj_num,ret_array)
            IF ret_array[1] < 10
               @ 1,10 SAY 'Index:  '+STR(HOT_INFO(),3)
               @ 2,10 SAY 'Type of object: '+STR(ret_array[1],3)
               @ 3,10 SAY 'Color:           '+STR(ret_array[2],3)
               @ 4,10 SAY 'Fill:              '+STR(ret_array[3],3)
               @ 5,10 SAY 'Pattern:           '+STR(ret_array[4],3)
               @ 6,10 SAY 'Description:    '+ret_array[5]
               @ 7,10 SAY 'Combine index: '+STR(ret_array[6],3)
            ENDIF
            KEY_PRESS()
         ENDIF

See Also: LAYER_INFO() OBJ_ARRSIZ() OBJ_SETPNT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson