Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
VG_TEXT(3)		     Library Functions Manual		      VG_TEXT(3)

NAME
     VG_Text -- agar-vg text entity

SYNOPSIS
     #include <agar/core.h>
     #include <agar/gui.h>
     #include <agar/vg.h>

DESCRIPTION
     VG_Text  is  a  VG(3) node class which displays a text label.  The position
     and orientation of the label is described by two points.

INTERFACE
     VG_Text * VG_TextNew(VG_Node *parent, VG_Point *p1, VG_Point *p2)

     void VG_TextString(VG_Text *vg, const char *text)

     void VG_TextPrintf(VG_Text *vg, const char *fmt, ...)

     void VG_TextAlignment(VG_Text *vt, enum vg_alignment alignment)

     void VG_TextFontFace(VG_Text *vt, const char *face)

     void VG_TextFontSize(VG_Text *vt, int points)

     void VG_TextFontFlags(VG_Text *vt, Uint flags)

     void VG_TextSubstObject(VG_Text *vt, AG_Object *obj)

     The VG_TextNew() function creates a new text  entity  attached  to  parent.
     The text will be aligned with a line described by the points p1 and p2.

     The  functions  VG_TextString() and VG_TextPrintf() change the text associ-
     ated with the element.  A NULL argument will result in no text  being  dis-
     played.

     VG_TextAlignment() specifies the alignment of the text:

     enum vg_alignment {
	     VG_ALIGN_TL, VG_ALIGN_TC, VG_ALIGN_TR,
	     VG_ALIGN_ML, VG_ALIGN_MC, VG_ALIGN_MR,
	     VG_ALIGN_BL, VG_ALIGN_BC, VG_ALIGN_BR
     };

     VG_TextFontFace()	sets the font face to use in rendering the text (for ex-
     ample, the "algue" built-in, or a font filename).	See AG_Text(3)	for  de-
     tails.

     VG_TextFontSize()	sets the size of the font in points.  VG_TextFontFlags()
     sets various text rendering options, as documented in AG_Text(3).

     The VG_TextSubstObject() function enables run-time substitution of AG_Vari-
     able(3) references in the text.  Before the text is rendered  to  the  dis-
     play,  references of the form "$(foo)" will be substituted for the contents
     of the variable `foo' of object obj.

SEE ALSO
     VG(3), VG_Point(3)

HISTORY
     The VG_Text class first appeared in Agar 1.3.3.

Agar 1.7			December 21, 2022		      VG_TEXT(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=VG_Text&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help