*-----------------------------------------------------------------------
      SUBROUTINE SGPLXR(N,RPX,RPY,ITYPE,INDEX,ICOLOR)

      REAL      RPX(*),RPY(*)
      LOGICAL LFCATR

      CALL SWQFCC(LFCATR)
      IF(.NOT.LFCATR) THEN
        CALL MSGDMP('M','SGPLXR','FULL COLOR MODE IS NOT SUPPORTED.')
      END IF

      IF (N.LT.2) THEN
        CALL MSGDMP('E','SGPLXR','NUMBER OF POINTS IS LESS THAN 2.')
      END IF
      IF (ITYPE.EQ.0) THEN
        CALL MSGDMP('M','SGPLXR','LINETYPE IS 0 / DO NOTHING.')
        RETURN
      END IF
      IF (INDEX.EQ.0) THEN
        CALL MSGDMP('M','SGPLXR','POLYLINE INDEX IS 0 / DO NOTHING.')
        RETURN
      END IF
      IF (INDEX.LT.0) THEN
        CALL MSGDMP('E','SGPLXR','POLYLINE INDEX IS LESS THAN 0.')
      END IF

      CALL SWSFCM(.TRUE.)
      CALL SWSLCL(ICOLOR)

      CALL SZPLOP(ITYPE,INDEX)
      CALL SZPLZR(N,RPX,RPY)
      CALL SZPLCL

      CALL SWSFCM(.FALSE.)

      END
