• shSaoCircleDraw
  • shSaoEllipseDraw
  • shSaoBoxDraw
  • shSaoPolygonDraw
  • shSaoArrowDraw
  • shSaoTextDraw
  • shSaoPointDraw
  • shSaoResetDraw
  • shSaoLabel
  • shSaoGlyph
  • saoDraw.c

      All 'glyphs' drawn on the display by
      any saoDraw routine can be saved into a file and then redrawn on a future
      display.  This saving and restoring of glyphs is done through the FSAOimage
      cursor read and write commands available on the FSAOimage button panel.
      

    All of the draw routines share the following three parameters in common which need more discussion -

    The parameter a_ptr_list_ptr is of type char ***. What this pointer is doing is mimicing the Tcl lists that can be input to the associated Tcl Sao draw commands. Thus for example, if I wanted to draw 3 separate circle glyphs in fSAO (a_numGlyphs = 3) , each of which was an annulus with two rings of radius rad1 and rad2, (a_numGlyphElems = 2), my a_ptr_list_ptr parameter would look as follows -

    
          ----------------       ------             ------
         | a_ptr_list_ptr | --> | row  | --------> | row1 |
          ----------------       ------             ------
                                | col  | ------.   | row2 |
                                 ------        |    ------
                                | rad1 | ----. |   | row3 |
                                 ------      | |    ------
                                | rad2 | -.  | |
                                 ------   |  | |    ------
                                          |  | --->| col1 |
                                          .  |      ------
                                          .  |     | col2 |
                                          .  |      ------
                                             |     | col3 |
                                             |      ------
                                             |
                                             |      -------
                                             ----->| rad1a |
                                                    -------
                                                   | rad1b |
                                                    -------
                                                   | rad1c |
                                                    -------
    
      

    Unfortunately, a_numGlyphsElems must be the same for each separate glyph. So you cannot include in a_ptr_list_ptr (at the same time) a glyph which is a circle which is an annulus and one that is not. You would need to make two separate calls to the appropriate routine, one for the annulus case and one for the other.

    
    

    shSaoCircleDraw

    DESCRIPTION:
    
    The shSaoCircleDraw routine enables the user to place a circle of user defined size on the FSAOimage display.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
       SH_MALLOC_ERR        - Error mallocing enough space to contain the command
       SH_PIPE_WRITE_MAX    - Could not write to fSAO process.
       SH_PIPE_WRITEERR     - Error writing to pipe.
    
    
    SIGNATURE:
      RET_CODE shSaoCircleDraw
        (
         int  a_saoindex,          /* IN: fSAOimage program in which to draw the
                                          glyph.  If = SAOINDEXINITVAL then use the
                                          first fSAO process we know about. */
         char ***a_ptr_list_ptr,   /* IN: Pointer to a list of parameters, described
                                          more precisely above. */
         int  a_numGlyphs,         /* IN: Number of individual glyphs to send to
                                          fSAO. (See above) */
         int  a_numGlyphElems,     /* IN: Number of parameters in each glyph. (See
                                          above) */
         int  a_excludeFlag,       /* IN: If TRUE, mark this glyph (or set of glyphs)                                    as an exclude glyph.  Same as exclude for
                                          SAOimage cursor regions. */
         int  a_isAnnulus          /* IN: Is this glyph an annulus. (See above) */
        )   
    

    shSaoEllipseDraw

    DESCRIPTION:
    
    The shSaoEllipseDraw routine enables the user to place an ellipse of user defined size on the FSAOimage display.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
       SH_MALLOC_ERR        - Error mallocing enough space to contain the command
       SH_PIPE_WRITE_MAX    - Could not write to fSAO process.
       SH_PIPE_WRITEERR     - Error writing to pipe.
    
    
    SIGNATURE:
      RET_CODE shSaoEllipseDraw
        (
         int  a_saoindex,          /* IN: fSAOimage program in which to draw the
                                          glyph.  If = SAOINDEXINITVAL then use the
                                          first fSAO process we know about. */
         char ***a_ptr_list_ptr,   /* IN: Pointer to a list of parameters, described
                                          more precisely above. */
         int  a_numGlyphs,         /* IN: Number of individual glyphs to send to
                                          fSAO. (See above) */
         int  a_numGlyphElems,     /* IN: Number of parameters in each glyph. (See
                                          above) */
         int  a_excludeFlag,       /* IN: If TRUE, mark this glyph (or set of glyphs)                                    as an exclude glyph.  Same as exclude for
                                          SAOimage cursor regions. */
         int  a_isAnnulus          /* IN: Is this glyph an annulus. (See above) */
        )   
    

    shSaoBoxDraw

    DESCRIPTION:
    
    The shSaoBoxDraw routine enables the user to place a box of user defined size on the FSAOimage display.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
       SH_MALLOC_ERR        - Error mallocing enough space to contain the command
       SH_PIPE_WRITE_MAX    - Could not write to fSAO process.
       SH_PIPE_WRITEERR     - Error writing to pipe.
    
    
    SIGNATURE:
      RET_CODE shSaoBoxDraw
        (
         int  a_saoindex,          /* IN: fSAOimage program in which to draw the
                                          glyph.  If = SAOINDEXINITVAL then use the
                                          first fSAO process we know about. */
         char ***a_ptr_list_ptr,   /* IN: Pointer to a list of parameters, described
                                          more precisely above. */
         int  a_numGlyphs,         /* IN: Number of individual glyphs to send to
                                          fSAO. (See above) */
         int  a_numGlyphElems,     /* IN: Number of parameters in each glyph. (See
                                          above) */
         int  a_excludeFlag,       /* IN: If TRUE, mark this glyph (or set of glyphs)                                    as an exclude glyph.  Same as exclude for
                                          SAOimage cursor regions. */
         int  a_isAnnulus          /* IN: Is this glyph an annulus. (See above) */
        )   
    

    shSaoPolygonDraw

    DESCRIPTION:
    
    The shSaoPolygonDraw routine enables the user to place a polygon of user defined size on the FSAOimage display.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
       SH_MALLOC_ERR        - Error mallocing enough space to contain the command
       SH_PIPE_WRITE_MAX    - Could not write to fSAO process.
       SH_PIPE_WRITEERR     - Error writing to pipe.
    
    
    SIGNATURE:
      RET_CODE shSaoPolygonDraw
        (
         int  a_saoindex,          /* IN: fSAOimage program in which to draw the
                                          glyph.  If = SAOINDEXINITVAL then use the
                                          first fSAO process we know about. */
         char ***a_ptr_list_ptr,   /* IN: Pointer to a list of parameters, described
                                          more precisely above. */
         int  a_numGlyphs,         /* IN: Number of individual glyphs to send to
                                          fSAO. (See above) */
         int  a_numGlyphElems,     /* IN: Number of parameters in each glyph. (See
                                          above) */
         int  a_excludeFlag        /* IN: If TRUE, mark this glyph (or set of glyphs)                                    as an exclude glyph.  Same as exclude for
                                          SAOimage cursor regions. */
        )   
    

    shSaoArrowDraw

    DESCRIPTION:
    
    The shSaoArrowDraw routine enables the user to place an arrow of user defined size on the FSAOimage display.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
       SH_MALLOC_ERR        - Error mallocing enough space to contain the command
       SH_PIPE_WRITE_MAX    - Could not write to fSAO process.
       SH_PIPE_WRITEERR     - Error writing to pipe.
    
    
    SIGNATURE:
      RET_CODE shSaoArrowDraw
        (
         int  a_saoindex,          /* IN: fSAOimage program in which to draw the
                                          glyph.  If = SAOINDEXINITVAL then use the
                                          first fSAO process we know about. */
         char ***a_ptr_list_ptr,   /* IN: Pointer to a list of parameters, described
                                          more precisely above. */
         int  a_numGlyphs,         /* IN: Number of individual glyphs to send to
                                          fSAO. (See above) */
         int  a_numGlyphElems,     /* IN: Number of parameters in each glyph. (See
                                          above) */
         int  a_excludeFlag        /* IN: If TRUE, mark this glyph (or set of glyphs)                                    as an exclude glyph.  Same as exclude for
                                          SAOimage cursor regions. */
        )   
      
    

    shSaoTextDraw

    DESCRIPTION:
    
    The shSaoTextDraw routine enables the user to place text on the FSAOimage display.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
       SH_MALLOC_ERR        - Error mallocing enough space to contain the command
       SH_PIPE_WRITE_MAX    - Could not write to fSAO process.
       SH_PIPE_WRITEERR     - Error writing to pipe.
    
    
    SIGNATURE:
      RET_CODE shSaoTextDraw
        (
         int  a_saoindex,          /* IN: fSAOimage program in which to draw the
                                          glyph.  If = SAOINDEXINITVAL then use the
                                          first fSAO process we know about. */
         char ***a_ptr_list_ptr,   /* IN: Pointer to a list of parameters, described
                                          more precisely above. */
         int  a_numGlyphs,         /* IN: Number of individual glyphs to send to
                                          fSAO. (See above) */
         int  a_numGlyphElems,     /* IN: Number of parameters in each glyph. (See
                                          above) */
         int  a_excludeFlag        /* IN: If TRUE, mark this glyph (or set of glyphs)                                    as an exclude glyph.  Same as exclude for
                                          SAOimage cursor regions. */
        )   
    

    shSaoPointDraw

    DESCRIPTION:
    
    The shSaoPointDraw routine enables the user to mark a point on the FSAOimage display.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
       SH_MALLOC_ERR        - Error mallocing enough space to contain the command
       SH_PIPE_WRITE_MAX    - Could not write to fSAO process.
       SH_PIPE_WRITEERR     - Error writing to pipe.
    
    
    SIGNATURE:
      RET_CODE shSaoPointDraw
        (
         int  a_saoindex,          /* IN: fSAOimage program in which to draw the
                                          glyph.  If = SAOINDEXINITVAL then use the
                                          first fSAO process we know about. */
         char ***a_ptr_list_ptr,   /* IN: Pointer to a list of parameters, described
                                          more precisely above. */
         int  a_numGlyphs,         /* IN: Number of individual glyphs to send to
                                          fSAO. (See above) */
         int  a_numGlyphElems,     /* IN: Number of parameters in each glyph. (See
                                          above) */
         int  a_excludeFlag        /* IN: If TRUE, mark this glyph (or set of glyphs)                                    as an exclude glyph.  Same as exclude for
                                          SAOimage cursor regions. */
        )   
    

    shSaoResetDraw

    DESCRIPTION:
    
    The shSaoResetDraw routine enables the user to reset the FSAOimage display by erasing all the previously drawn glyphs. This routine performs the same function as the SAOimage cursor reset button.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
    
    
    SIGNATURE:
      RET_CODE shSaoResetDraw
        (
         int a_saoindex    /* IN: fSAO program to send the reset command to */
        )   
    

    shSaoLabel

    DESCRIPTION:
    
    The shSaoLabel routine enables the user to toggle the displaying of the labels for drawn glyphs on the FSAOimage display. This routine performs the same function as the SAOimage cursor label button. If the passed value is equal to -1, this routine acts as a toggle.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
    
    
    SIGNATURE:
      RET_CODE shSaoLabel
        (
         int a_saoindex,    /* IN: fSAO program to send the reset command to */
         int a_labelType    /* IN: If = TRUE, turn label on, if = FALSE, turn
      			 label off, if = -1, toggle label. */
        )   
    

    shSaoGlyph

    DESCRIPTION:
    
    The shSaoGlyph routine enables the user to toggle the displaying of the glyphs on the FSAOimage display. If the passed value is equal to -1, this routine acts as a toggle.
    RETURN VALUES:
       SH_SUCCESS           - Successful completion
       SH_SAO_NUM_INV       - An invalid saoindex was specified.
       SH_RANGE_ERR         - The specified saoindex value was too large.
       SH_NO_FSAO           - No fSAO process associated with this process
    
    
    SIGNATURE:
      RET_CODE shSaoGlyph
        (
         int a_saoindex,    /* IN: fSAO program to send the reset command to */
         int a_glyphType    /* IN: If = TRUE, turn glyph on, if = FALSE, turn
      			 glyph off, if = -1, toggle glyph. */
        )