PWRITX(3NCARG)

๐Ÿ’– PWRITX ๐Ÿ’– โ€” the NCAR Graphics one, bestie

okay so this is PWRITX(3NCARG) from the NCAR GRAPHICS manual, and it's a whole mood. Let's get into it. ๐ŸŽ€


โœจ NAME โœจ

PWRITX โ€” draws text and other characters using polylines. That's it, that's the girl. ๐Ÿ’…


๐Ÿ› ๏ธ UTILITY ๐Ÿ› ๏ธ

This routine is part of the Pwrite_family utility in NCAR Graphics. Wanna see the overview man page for this utility? Type:

man pwrite_family

iykyk ๐Ÿ’–


๐Ÿšจ STATUS ๐Ÿšจ

PWRITX is obsolete. Not me being the bearer of bad news but fr fr, she's been replaced. ๐Ÿ’€

It has been replaced by the PLCHHQ, PLCHMQ, and PLCHLQ entries of the Plotchar utility.

PWRITX continues to be provided for compatibility of early NCAR Graphics codes. So like, if you're writing new code, we suggest that you use Plotchar. Please bestie, use Plotchar. ๐Ÿซถ


๐Ÿ“œ SYNOPSIS ๐Ÿ“œ

CALL PWRITX (X,Y,IDPC,NCHAR,JSIZE,JOR,JCTR)

that's the whole summoning ritual right there โœจ


๐Ÿ“– DESCRIPTION ๐Ÿ“–

Let's go through every single one of these, no skipping, periodt. ๐Ÿ‘‘

  • X โ€” an input parameter of type REAL defining the X world coordinate of the text string to be drawn using polylines.
  • Y โ€” an input parameter of type REAL defining the Y world coordinate of the text string to be drawn using polylines.
  • IDPC โ€” an input string of type CHARACTER which are the characters to be drawn. There may also be embedded function codes describing how certain characters are to be drawn. (sneaky little bonus codes, love that for them ๐Ÿฆ‹)
  • NCHAR โ€” an input parameter of type INTEGER giving the number of characters in the IDPC string. Heads up: NCHAR includes a count of all characters in the string, including the function codes. So don't be out here undercounting, bestie. ๐Ÿ˜ญ
  • JSIZE โ€” an input parameter of type INTEGER giving the width of the characters to be drawn. And here's the little menu:
    • 0 โ€” 1.0 * the size of the digitized characters in the database
    • 1 โ€” 1.5 * digitized size
    • 2 โ€” 2.0 * digitized size
    • 3 โ€” 3.0 * digitized size

If greater than 3:

Principal characters    =          JSIZE
Indexical characters    =  (13/21)*JSIZE
Cartographic characters =  ( 9/21)*JSIZE

One can relate these sizes to a viewport in normalized device coordinates (each axis runs 0. to 1.) by dividing by 1023. That is a character of width .05 would take up 5% of the possible picture width meaning that less than 20 characters could fit on a line. math girlie behaviour, we respect it ๐Ÿงฎโœจ

Important!! Note that there is an important difference in how text sizes are handled in GKS versus PWRITX. In GKS, text size is given in terms of character heights. In PWRITX, text size (JSIZE) is given in character width. Do not confuse these, I am begging you. ๐Ÿ˜ญ
  • JOR โ€” an input parameter of type INTEGER giving the orientation at which the IDPC string is to be drawn. JOR is measured counter-clockwise from the positive X axis. spin it, rotate it, slay it ๐Ÿ’ซ
  • JCTR โ€” an input parameter of type INTEGER giving the centering option for the IDPC character string.
    • 0 โ€” (X,Y) is the center of the entire IDPC string.
    • -1 โ€” (X,Y) is the center of the left edge of the first character.
    • 1 โ€” (X,Y) is the center of the right edge of the last character.

three centering options, three vibes, pick your main character energy ๐Ÿ‘‘


๐Ÿ”‘ ACCESS ๐Ÿ”‘

To use PWRITX, load the NCAR Graphics libraries ncarg, ncarg_gks, ncarg_c, and ncarg_c โ€” preferably in that order. (yes, ncarg_c shows up twice in the original list, and I am simply reporting the facts, bestie ๐Ÿ™ˆ)


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

  • Online: pwrite_family, pwrity, plotchar, plchhq, plchmq, plchlq
  • Hardcopy: NCAR Graphics Fundamentals, UNIX Version; User's Guide for NCAR GKS-0A Graphics

go read the whole family, they're all iconic ๐Ÿซถ


Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.

and that's the tea, bestie ๐Ÿ’œ This lil gem dropped back in March 1993 under the UNIX manual, straight from the NCAR Graphics crew โ€” so if you're out here calling PWRITX, you're basically running vintage. Vintage is a vibe, but fr fr go use Plotchar. ๐ŸŽ€โœจ๐Ÿ’–