GSET_CHAR_UP_VEC(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

✨ GSET_CHAR_UP_VEC ✨ (the 3NCARG page, NCAR GRAPHICS girlies rise πŸ’…)

okay so bestie, welcome to GSET_CHAR_UP_VEC β€” full government name is gset_char_up_vec (Set character up vector), and it does exactly one iconic thing: it specifies the angle at which subsequent text is to be drawn with gtext. that's it. that's the whole job. and she ATE. πŸŽ€


🌸 SYNOPSIS 🌸

#include <ncarg/gks.h>

void gset_char_up_vec(const Gvec *char_up_vec);

literally one function, one pointer, one vibe. no cap. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so char_up_vec is a Gvec struct and it's got two little fields, and here's the tea on each one:

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

that's the whole struct, bestie. two floats. two numbers. so much power. πŸ‘‘


πŸ’– USAGE πŸ’–

okay so here's how the math works and ngl it's giving geometry class but in a cute way:

the coordinates (char_up_vec.delta_x, char_up_vec.delta_y) β€” measured relative to the point (0.,0.) β€” establish a vector direction. that direction is the whole point of this function. it says two things:

  • it specifies the up direction of individual characters β€” like, which way is "up" for each lil letter 🫢
  • it also specifies the orientation of a text string, because the characters in a string are placed along a line <em>perpendicular</em> to the character up vector. yes, perpendicular. the string runs sideways relative to the up vector, iykyk. 🌈

by default, the character up vector is (0.,1.), so characters get drawn in their normal horizontal orientation. the standard vibe. the default slay. πŸ’…

and here's a fun lil detail: the magnitude of the up vector is not used. so (0.,23.) is the same as (0.,1.). direction only, bestie. length is irrelevant, we don't body-shame vectors here. ✨


πŸŽ€ EXAMPLES πŸŽ€

okay so example numero uno β€” say you want a Y-axis label situation:

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. rotating 90 degrees? that's main character energy fr fr. πŸ”₯

and example numero dos:

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. (yes, "degress". i said what the manpage said, i am simply the messenger 🫑)


πŸ‘‘ ACCESS πŸ‘‘

to use the GKS C-binding routines, load the ncarg_gks and ncarg_c libraries. that's the entry fee, babe. pay it. πŸ’Έ


🌟 SEE ALSO 🌟

so there's a whole friend group here and honestly they're all icons:

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

go read those too, bestie. knowledge is free and it's giving scholar. πŸ“šβœ¨


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

okay and for the sign-off: this whole thing is from the UNIX manual, dated March 1993, and the page you're reading is GSET_CHAR_UP_VEC(3NCARG). yes she's an elder but she's still that girl. periodt. πŸ’…πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from