      SUBROUTINE ECRCOM(LEG,LONG,X,Y,XMB,YMB,YBOX,IGROS,IOPT,FRANCAIS)
      DIMENSION X(2),Y(2),XX(4),YY(4),VIVI(2),XF(4),YF(4)
      LOGICAL*4     FRANCAIS
      CHARACTER*(*) LEG
      SAVE DX,DY
C
      IF (FRANCAIS) THEN
        CALL COMMENTE_PS('Début de commentaire',20)
      ELSE
        CALL COMMENTE_PS('Beginning of commentary',23)
      ENDIF      
      VIVI(1) = X(1)-X(2)
      VIVI(2) = Y(1)-Y(2)
      IF (IOPT.EQ.0) THEN
        CALL GSCOL(7)
        CALL GSPATF(7)
        CALL GSPAT(-16)
      ENDIF
      CALL GSLW(IGROS)
      CALL GSLT(0)
      CALL GSMOVE(X(1),Y(1))
      CALL GSLINE(X(2),Y(2))
      CALL GSLW(IGROS+1)
      CALL METSACCENTS(1)
      IF (IOPT.NE.1) THEN
        TAILL = TAILLE_CHAINE(LEG,LONG)
        DX = TAILL + 1.5*XMB
        DY = YBOX  + 1.2*YMB
      ENDIF
      XX(1) = X(2)
      YY(1) = Y(2)
      XX(2) = XX(1)
      YY(4) = YY(1)
      IF (VIVI(1).GE.0.) THEN
        SIGX = -1.
        IF (VIVI(2).GE.0.) THEN
          SIGY = -1.
          IC = 3
        ELSE
          SIGY = 1.
          IC = 4
        ENDIF
      ELSE
        SIGX = 1.
        IF (VIVI(2).GE.0.) THEN
          SIGY = -1.
          IC = 2
        ELSE
          SIGY = 1.
          IC = 1
        ENDIF
      ENDIF
      YY(2) = YY(1) + SIGY*DY
      XX(3) = XX(1) + SIGX*DX
      XX(4) = XX(3)
      YY(3) = YY(2)
      IF (IOPT.EQ.0) THEN
        XF(1) = X(2)
        YF(1) = Y(2)
        XF(3) = X(1)
        YF(3) = Y(1)
        XF(2) = XX(1) + SIGX*XMB*.4
        YF(2) = YY(1)
        XF(4) = XX(1)
        YF(4) = YY(1) + SIGY*YMB*.4
        CALL MY_GSAREA(0,XF,YF,4)
        CALL GSPATF(0)
        CALL GSPAT(16)
        CALL MY_GSAREA(1,XX,YY,4)
      ELSE
        CALL GSPLNEC(4,XX,YY)
      ENDIF
      CALL GSCHAR(XX(IC)+.75*XMB,YY(IC)+YMB,LONG,LEG)
      CALL METSACCENTS(0)
      IF (FRANCAIS) THEN
        CALL COMMENTE_PS('Fin de commentaire',18)
      ELSE
        CALL COMMENTE_PS('End of commentary',17)
      ENDIF
      END
