GSET_TEXT_ALIGN(3NCARG)

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

✨ GSET_TEXT_ALIGN ✨ (a.k.a. gset_text_align from the NCAR Graphics manual, section 3NCARG)

okay bestie, sit down, hydrate, because today we're learning how to tell your text where to stand. this is gset_text_align β€” the glow-up that sets the text alignment. yes it's a C-binding GKS thing, yes it's from 1993, and yes it still eats. πŸ’…


πŸŽ€ NAME πŸŽ€

gset_text_align (Set text alignment) β€” sets the text alignment. that's it, that's the whole job. iconic behavior honestly.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ncarg/gks.h>

void gset_text_align(const Gtext_align *text_align);

she takes exactly one argument and she takes it seriously. ✨


πŸ’– DESCRIPTION πŸ’–

so the struct you're handing over has two little fields, and each one is a whole personality:

  • text_align.hor β€” (Input) this one decides the horizontal alignment of the text that's about to be drawn. your options are:
    • GHOR_NORM β€” Normal (this is the default, the factory setting, the no-thoughts-just-vibes choice)
    • GHOR_LEFT β€” Left
    • GHOR_CTR β€” Center
    • GHOR_RIGHT β€” Right
  • text_align.vert β€” (Input) and this one decides the vertical alignment of the text to be drawn. pick your fighter:
    • GVERT_NORM β€” Normal (again, the default 🫢)
    • GVERT_TOP β€” Top
    • GVERT_CAP β€” Cap
    • GVERT_HALF β€” Half
    • GVERT_BASE β€” Base
    • GVERT_BOTTOM β€” Bottom

that's ten total combos of alignment energy. choose wisely, she notices. πŸ‘‘


🌸 USAGE 🌸

here's the tea: text alignment is what you use to position the text extent rectangle. and the way that rectangle rotates about a point? that point is literally determined by your horizontal and vertical text alignment settings β€” aka text_align.hor and text_align.vert. so yeah, these two fields are lowkey running the whole show. not me being dramatic, that's just the actual mechanic. 😭


🌈 ACCESS 🌈

to use the GKS C-binding routines, load the ncarg_gks and ncarg_c libraries. load them. both. no skipping, bestie. 🧚


⭐ SEE ALSO ⭐

πŸ“š Online

  • gtext(3NCARG)
  • gset_text_path(3NCARG)
  • gset_text_font_prec(3NCARG)
  • gset_char_ht(3NCARG)
  • gset_char_space(3NCARG)
  • gset_char_up_vec(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)

(if you ever need to ask instead of set, ginq_text_align(3NCARG) is right there β€” she's the read-only bestie. 🫢)

πŸ“– Hardcopy

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

Copyright (C) 1987-2009 University Corporation for Atmospheric Research

The use of this Software is governed by a License Agreement.

fr fr, respect the license. it's giving legally binding. πŸ’€

and that's the whole page, bestie β€” you're now officially fluent in text alignment. go align something and make it gorgeous. βœ¨πŸ’–

signing off from the UNIX corner of the world, dated March 1993, page GSET_TEXT_ALIGN(3NCARG) β€” she's old, she's beloved, she's still serving. πŸŽ€

πŸ“¦ where this page comes from