*-----------------------------------------------------------------------
*     Copyright (C) 2000-2022 GFD Dennou Club. All rights reserved.
*-----------------------------------------------------------------------
      SUBROUTINE SGTXZR(RX,RY,CHARS,RSIZE,IROTA,ICENT,INDEX)

      CHARACTER CHARS*(*)


      IF (RSIZE.EQ.0) THEN
        CALL MSGDMP('M','SGTXZR','TEXT HEIGHT IS 0 / DO NOTHING.')
        RETURN
      END IF
      IF (RSIZE.LT.0) THEN
        CALL MSGDMP('E','SGTXZR','TEXT HEIGHT IS LESS THAN ZERO.')
      END IF
      IF (.NOT.(-1.LE.ICENT .AND. ICENT.LE.1)) THEN
        CALL MSGDMP('E','SGTXZR','CENTERING OPTION IS INVALID.')
      END IF
      IF (INDEX.EQ.0) THEN
        CALL MSGDMP('M','SGTXZR','TEXT INDEX IS 0 / DO NOTHING.')
        RETURN
      END IF
      IF (INDEX.LT.0) THEN
        CALL MSGDMP('E','SGTXZR','TEXT INDEX IS LESS THAN 0.')
      END IF

      CALL SZTXOP(RSIZE,IROTA,ICENT,INDEX)
      CALL SZTXZR(RX,RY,CHARS)
      CALL SZTXCL

      END
