'\" t .\" Title: s3d_draw_string .\" Author: Simon Wunderlich .\" Generator: DocBook XSL Stylesheets .\" .\" Manual: s3d Manual .\" Source: s3d .\" Language: English .\" .TH "S3D_DRAW_STRING" "3" "" "s3d" "s3d Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" s3d_draw_string \- draw a simple string .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'int\ s3d_draw_string('u .BI "int s3d_draw_string(const\ char\ *" "str" ", float\ *" "xlen" ");" .SH "DESCRIPTION" .PP Renders the string str with in Truetype format with the height 1, returns the length of the rendered string in *xlen (or set len=NULL to disable this)\&. .sp .if n \{\ .RS 4 .\} .nf char str="hello world!"; float len; s3d_select_font("vera"); s3d_draw_string(str, len); // not interested in the length? do that: s3d_draw_string(str, NULL); .fi .if n \{\ .RE .\} .SH "AUTHOR" .PP \fBSimon Wunderlich\fR .RS 4 Author of s3d .RE