SilverScreen Solid Modeler

scan_primitive

scan_primitive

Previous topic Next topic  

scan_primitive

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

int scan_primitive ( char *message, int p_type, char *buf )

 

char *message;       // prompt message

int   p_type;        // primitive type mask

char *buf;           // character buffer to receive primitive name

 

 




Synopsis

#include "silver.h"

 

The scan_primitive function displays message and then allows the user to pick a primitive, based on p_type .

 

 

Parameters

message is a null-terminated string containing the prompt message. p_type is an integer value specifying which primitive types are to be considered for picking: BITS_ARC , BITS_BEZIER , BITS_CIRCLE , BITS_LINE , BITS_POLYGON , BITS_POLYLINE or BITS_SPLINE may be or'ed together to obtain p_type . buf is a character buffer that is to receive the full path name of the selected primitive.

 

 

Return Value

If a selection is successfully made, then 1 is returned and the path name of the selected primitive is copied into buf ; otherwise, 0 is returned.

 

 

Comments

If p_type is BITS_LINE or BITS_ARC, then pick_primitive selects only independent lines or arcs. That is, it does not select lines or arcs that are contained in polygons or polylines. In order to select lines and arcs that are contained within polygons or polylines, BITS_LINE or BITS_ARC must be combined with BITS_POLYGON and/or BITS_POLYLINE .

 

pick_primitive operates in pick mode. The function prompt_primitive operates in either pick or scan mode, while scan_primitive operates in scan mode.

 

 

See Also

pick_primitive , prompt_primitive