GSET_CHAR_UP_VEC(3NCARG)

✨ GSET_CHAR_UP_VEC ✨

okay bestie, welcome to the NCAR GRAPHICS section of the manual (that's the 3NCARG girlies, you know the ones) πŸ’… and today we're talking about gset_char_up_vec β€” Set character up vector. That's literally the whole name, no notes. πŸŽ€


🌸 NAME 🌸

gset_char_up_vec (Set character up vector) β€” she specifies the angle at which subsequent text is gonna be drawn with gtext. That's it. That's the job. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ncarg/gks.h>

void gset_char_up_vec(const Gvec *char_up_vec);

look at her. so short. so powerful. 🫢


πŸ’– DESCRIPTION πŸ’–

so the one argument is a pointer to a Gvec, and inside it there's two little fields, and here's what they do:

  • char_up_vec.delta_x β€” (Gfloat, Input) gives you the X (horizontal) world coordinate of a vector. πŸ’«
  • char_up_vec.delta_y β€” (Gfloat, Input) gives you the Y (vertical) world coordinate of a vector. πŸ’«

two numbers. one vector. character up direction. iconic behavior honestly. ✨


🌈 USAGE 🌈

okay so here's the tea πŸ“ β€” the coordinates (char_up_vec.delta_x, char_up_vec.delta_y) are taken relative to the point (0.,0.), and together they establish a vector direction. That direction does two things at once, which is very main character of it:

  1. It specifies the up direction of individual characters. πŸ”₯
  2. It also specifies the orientation of a text string, because the characters in a string get placed along a line perpendicular to the character up vector. πŸ¦‹

By default the character up vector is (0.,1.), so characters are drawn in their normal horizontal orientation β€” you know, the standard vibe, no rotation, no drama. πŸ’–

ngl the magnitude of the up vector is not used, bestie. so (0.,23.) is literally the same as (0.,1.). the length does not matter, only the direction. periodt. πŸ’…

⭐ EXAMPLES ⭐

first one, she's giving Y-axis label energy:

char_up_vec.delta_x = -1.
char_up_vec.delta_y = 0.
gset_char_up_vec(&char_up_vec);

this would specify the character up vector as (-1.,0.), and subsequent text written with gtext would be rotated 90 degrees from normal and would be appropriate for a Y-axis label. yes ma'am. πŸ‘‘

and then, the diagonal girlie:

char_up_vec.delta_x = 1.
char_up_vec.delta_y = 1..
gset_char_up_vec(&char_up_vec);

this would specify the character up vector as (1.,1.), and subsequent text written with gtext would be rotated -45 degress from normal. (that's "degress", as the original spells it β€” we keep it exactly, no cap, character for character πŸ™ˆ)


πŸŽ€ ACCESS πŸŽ€

to use the GKS C-binding routines, you gotta load the ncarg_gks and ncarg_c libraries. both of them. don't skip one, that's not the move. 🫢


πŸ’œ SEE ALSO πŸ’œ

Online:

  • gtext(3NCARG)
  • gset_text_path(3NCARG)
  • gset_text_align(3NCARG)
  • gset_text_font_prec(3NCARG)
  • gset_char_ht(3NCARG)
  • gset_char_space(3NCARG)
  • gset_char_expan(3NCARG)
  • gset_colr_rep(3NCARG)
  • gset_text_colr_ind(3NCARG)
  • ginq_text_path(3NCARG)
  • ginq_text_align(3NCARG)
  • ginq_text_font_prec(3NCARG)
  • ginq_char_ht(3NCARG)
  • ginq_char_space(3NCARG)
  • ginq_char_up_vec(3NCARG)
  • ginq_char_expan(3NCARG)
  • plotchar(3NCARG)
  • gks(3NCARG)
  • ncarg_gks_cbind(3NCARG)

Hardcopy:

  • User's Guide for NCAR GKS-0A Graphics
  • NCAR Graphics Fundamentals, UNIX Version

whole friend group. go read them all, iykyk. πŸ’«


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

and that's the page, bestie 🧚✨ β€” sourced from the UNIX manual, dated March 1993, filed under GSET_CHAR_UP_VEC(3NCARG). go rotate some text, you're gonna slay πŸ’–πŸŒΈπŸ¦‹