gf_draw_polyline()

Draw a polyline

Synopsis:

#include <gf/gf.h>

int gf_draw_polyline( gf_context_t context,
                      const gf_point_t *pts,
                      size_t npoints,
                      uint32_t flags );

Arguments:

context
The graphics context to use.
pts
An array of gf_point_t structures that represent the vertices of the polygon.
npoints
The number of items in pts. There must be at least two points, or the function doesn't draw anything.
flags
Flags controlling the functions behavior. Currently one flag is defined: GF_DRAW_POLYLINE_CLOSED — set this bit to join the last point in the polygon to the first.

Library:

gf

Description:

This function draws a polyline, using the specified draw context. The polyline is rendered using the current foreground color. You can also use this function to render a single line or a stroked outline rectangle.


Note: This function will not render a polyline that is under 3 pixels in length.

Returns:

GF_ERR_OK
Success.
GF_ERR_NOSUPPORT
No support for the requested primitive and/or state; the operation needs to be broken down into simpler pieces.
GF_ERR_NOLOCK
The hardware isn't locked; check to ensure gf_draw_begin() was called successfully.

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_context_set_linedash(), gf_context_set_linejoin(), gf_draw_poly_fill(), gf_point_t

Drawing lines and polygons in the Basic Drawing chapter