| 1 |
C Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 2 |
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
C NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
C |
| 5 |
C See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
C======================================================================= |
| 8 |
SUBROUTINE GRTEXC (DX, DY, STRING) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** GRTEXC *** (GRPLIB) Write centered text (PLT) |
| 12 |
C -- Written by Amy Gilkey - revised 03/22/88 |
| 13 |
C -- |
| 14 |
C --GRTEXC writes a software or hardware character string centered on |
| 15 |
C --a location. |
| 16 |
C -- |
| 17 |
C --Parameters: |
| 18 |
C -- DX, DY - IN - the horizontal and vertical string location |
| 19 |
C -- (in device coordinates) |
| 20 |
C -- STRING - IN - the string to be written, may be truncated |
| 21 |
C -- |
| 22 |
C --Common Variables: |
| 23 |
C -- Uses ICURDV, SOFTCH of /GRPCOM/ |
| 24 |
|
| 25 |
C --Routines Called: |
| 26 |
C -- PLTXSL - (PLTLIB) Find the software string length |
| 27 |
C -- PLTXTC1 - (PLTLIB) Display a centered software string |
| 28 |
C -- PLTXTH - (PLTLIB) Display a hardware string |
| 29 |
C -- PLTXTL - (PLTLIB) Find the hardware string length |
| 30 |
C -- LENSTR - (STRLIB) Find string length |
| 31 |
|
| 32 |
include 'grpcom.blk' |
| 33 |
|
| 34 |
REAL DX, DY |
| 35 |
CHARACTER*(*) STRING |
| 36 |
|
| 37 |
LSTR = LENSTR(STRING) |
| 38 |
IF (STRING(LSTR:LSTR) .EQ. ' ') RETURN |
| 39 |
|
| 40 |
IF (SOFTCH(ICURDV)) THEN |
| 41 |
CALL PLTXSL (STRING(:LSTR), SLEN) |
| 42 |
XLEFT = DX |
| 43 |
IF (XLEFT*2 .LT. SLEN) XLEFT = 0.5*SLEN |
| 44 |
CALL PLTXTC1 (XLEFT, DY, STRING(:LSTR)) |
| 45 |
ELSE |
| 46 |
CALL PLTXHL (STRING(:LSTR), SLEN) |
| 47 |
XLEFT = DX - .5*SLEN |
| 48 |
IF (XLEFT .LT. 0.0) XLEFT = 0.0000 |
| 49 |
CALL PLTXTH (XLEFT, DY, STRING(:LSTR)) |
| 50 |
END IF |
| 51 |
|
| 52 |
RETURN |
| 53 |
END |