GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
VG_TEXT(3) FreeBSD Library Functions Manual VG_TEXT(3)

VG_Text
agar-vg text entity

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

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.

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 associated with the element. A NULL argument will result in no text being displayed.

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 example, ‘_agFontVera’ which is built-in, or a filename). See AG_Text(3) for details.

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_Variable(3) references in the text. Before the text is rendered to the display, references of the form "$(foo)" will be substituted for the contents of the variable ‘foo’ of object obj.

VG(3), VG_Point(3)

The VG_Text class first appeared in Agar 1.3.3.
July 25, 2008 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.