1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<TITLE>GDInitGDLObj</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GDInitGDLObj</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;revolution/gd.h&gt;</CODE></PRE>
16  <DD>
17  <PRE><CODE>void GDInitGDLObj(
18    <A href="GDLObj.html">GDLObj</A>* dl,
19    void*   start,
20    u32     length );</CODE></PRE>
21</DL>
22<H2>Arguments</H2>
23<TABLE border="1" cellpadding="3" cellspacing="0.1">
24  <TBODY>
25    <TR>
26<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>dl</CODE></EM></STRONG></FONT></STRONG></EM></TD>
27<TD width="520">Pointer to a graphics display list object.</TD>
28    </TR>
29    <TR>
30<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>start</CODE></EM></STRONG></FONT></STRONG></EM></TD>
31<TD width="520">Pointer to a memory buffer that will contain the actual display list commands. Must have 32-byte alignment.</TD>
32    </TR>
33    <TR>
34<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>length</CODE></EM></STRONG></FONT></STRONG></EM></TD>
35<TD width="520">Length of the memory buffer in bytes. Must be a multiple of 32.</TD>
36    </TR>
37  </TBODY>
38</TABLE>
39<H2>Return Values</H2>
40<P>None.</P>
41<H2>Description</H2>
42<P>This function initializes a <a href="GDLObj.html"><CODE>GDLObj</CODE></a>--an object that manages display lists. Nearly all GD library functions operate based on <A href="GDLObj.html"><CODE>GDLObj</CODE></A> (usually current <A href="GDLObj.html"><CODE>GDLObj</CODE></A>). Specify a pointer to <A href="GDLObj.html"><CODE>GDLObj</CODE></A> you want to initialize in the <STRONG><EM><CODE>dl</CODE></EM></STRONG> argument. A memory buffer that <A href="GDLObj.html"><CODE>GDLObj</CODE></A> uses must be allocated in advance (for storing the actual display list). This memory buffer must have a 32-byte alignment. The arguments <STRONG><EM><CODE>start</CODE></EM></STRONG> and <STRONG><EM><CODE>length</CODE></EM></STRONG> are used to define this buffer. This function does not affect the buffer itself.</P>
43<P>The <STRONG><EM><CODE>top</CODE></EM></STRONG> in the <a href="GDLObj.html"><CODE>GDLObj</CODE></a> is initialized to (<STRONG><EM><CODE>start</CODE></EM></STRONG> + <STRONG><EM><CODE>length</CODE></EM></STRONG>). The <STRONG><EM><CODE>ptr</CODE></EM></STRONG> in the <a href="GDLObj.html"><CODE>GDLObj</CODE></a> is initialized to (<STRONG><EM><CODE>start</CODE></EM></STRONG>).</P>
44<H2>See Also</H2>
45<P><CODE><a href="GDGetGDLObjStart.html">GDGetGDLObjStart</a><br> <a href="GDGetGDLObjLength.html">GDGetGDLObjLength</a><br> <a href="GDSetCurrent.html">GDSetCurrent</a></CODE></P>
46<H2>Revision History</H2>
47<P>2006/03/01 Initial version.</P>
48<hr>
49<P>CONFIDENTIAL</p>
50</BODY>
51</HTML>