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_LINE(3) FreeBSD Library Functions Manual VG_LINE(3)

VG_Lineagar-vg line entity

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

VG_Line is a VG(3) node class which describes a line segment in terms of two points.

VG_Line *
(VG_Node *parent, VG_Point *p1, VG_Point *p2);


void
(VG_Line *vl, Uint8 thickness);


void
(VG_Line *vl, Uint16 pattern);


void
(VG_Line *vl, enum vg_endpoint_style style, ...);

The () function creates a new line segment entity attached to parent. The p1 and p2 arguments define the endpoints.

() defines the thickness of the line in pixels (default = 1 pixel). Note that the line thickness parameter does not influence proximity queries used by "select" tools. it only affects rendering, so very thick lines should be rendered as VG_Polygon(3) instead.

() defines a 16-bit, OpenGL-style stipple pattern (default is 0xffff). The order in which bits are used is undefined and depends on order of rendering.

By default, thick lines are rendered using a square endpoint style. () specifies the style of endpoints to use in rendering the line. Acceptable values include:

enum vg_line_endpoint {
	VG_LINE_SQUARE,		/* Square endpoint */
	VG_LINE_BEVELED,	/* Beveled endpoint */
	VG_LINE_ROUNDED,	/* Rounded endpoint (circular) */
	VG_LINE_MITERED		/* Mitered endpoint */
};

If VG_LINE_MITERED is used, () expects a following Uint8 argument describing the miter length in pixels.

VG(3), VG_Point(3)

The VG_Line class first appeared in Agar 1.3.3.

December 21, 2022 Agar 1.7

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.