L_VecSetPolygonMode

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecSetPolygonMode(pVector, nMode)

pVECTORHANDLE pVector;

/* pointer to a vector handle */

L_INT nMode;

/* polygon drawing mode */

Sets the current polygon drawing mode.

Parameter

Description

pVector

Pointer to a vector handle.

nMode

The polygon drawing mode to set. Possible values are:

 

Value

Meaning

 

VECTOR_POLYGON_POINT

Draw only the edges points on polygons and lines.

 

VECTOR_POLYGON_LINE

Draw as a wire-frame.

 

VECTOR_POLYGON_FILL

Draw solid polygons.

 

VECTOR_POLYGON_FILL_RASTER_ALWAYS

Draw solid polygons and always draw raster objects.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_VecGetPolygonMode

Example

/* This example toggles the polygon mode between Point, Line and Fill */

void TogglePolygonMode( pVECTORHANDLE pVector )
{
   L_INT nMode;   /* Current polygon mode */

   nMode = L_VecGetPolygonMode( pVector );

   switch( nMode )
   {
      case VECTOR_POLYGON_POINT:
         L_VecSetPolygonMode( pVector, VECTOR_POLYGON_LINE );
         break;

      case VECTOR_POLYGON_LINE :
         L_VecSetPolygonMode( pVector, VECTOR_POLYGON_FILL );
         break;

      case VECTOR_POLYGON_FILL :
         L_VecSetPolygonMode( pVector, VECTOR_POLYGON_FILL_RASTER_ALWAYS );
         break;

      case VECTOR_POLYGON_FILL_RASTER_ALWAYS :
         L_VecSetPolygonMode( pVector, VECTOR_POLYGON_POINT );
         break;
   }
}