1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7    <title>SetBuffer</title>
8  </head>
9  <body>
10    <h1><CODE><a href="../../../nw/Overview.html">nw</a>::<a href="../../../nw/font/Overview.html">font</a>::<a href="../../../nw/font/TextWriterBase/Overview.html">TextWriterBase</a>::SetBuffer</CODE> Member Function</h1>
11    <h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14static void * SetBuffer(
15     std::size_t size
16);
17static void * SetBuffer(
18     CharType*   buffer,
19     std::size_t size
20);
21</pre>
22    </div>
23    <h2>List of Overloaded Member Functions</h2>
24    <div class="section">
25      <table class="members">
26        <tr>
27          <td>
28            <a href="./SetBuffer(0).html">SetBuffer ( std::size_t ) </a>
29          </td>
30          <td>Allocates a buffer for extracting formatted text.</td>
31        </tr>
32        <tr>
33          <td>
34            <a href="./SetBuffer(1).html">SetBuffer ( CharType *, std::size_t ) </a>
35          </td>
36          <td>Allocates a buffer for extracting formatted text.</td>
37        </tr> </table>
38    </div>
39    <h2>Description of <CODE>SetBuffer ( std::size_t )</CODE></h2>
40    <div class="section"><p>This buffer is used to extract a formatted character string using a member function of TextWriter for handling formatted character strings. If the character string after extraction exceeds the size of this buffer, the excessive part of the string is truncated for the process. <br /> The five functions listed below are <CODE><a href="../../../nw/font/TextWriter.html">nw::font::TextWriter</a></CODE> member functions that handle formatted character strings.<br /><br /> <CODE>nw::font::TextWriter::CalcFormatStringWidth</CODE><br /> <CODE>nw::font::TextWriter::CalcFormatStringHeight </CODE> <br /><CODE>nw::font::TextWriter::CalcFormatStringRect</CODE> <br /> <CODE>nw::font::TextWriter::Printf</CODE><br /> <CODE>nw::font::TextWriter::VPrintf</CODE> .
41</p><p>For the format that specifies only the buffer size, the buffer is specified such that it is allocated on the stack. <B>Note:</B> The stack may overflow if an attempt is made to allocate too large a buffer on the stack.</p><p>A buffer holding 256 characters is allocated on the stack by default.</p></div>
42    <h2>Description of <CODE>SetBuffer ( CharType *, std::size_t ) </CODE></h2>
43    <div class="section"><p>This buffer is used to extract a formatted character string using a member function of TextWriter for handling formatted character strings. If the character string after extraction exceeds the size of this buffer, the excessive part of the string is truncated for the process. <br /> The five functions listed below are <CODE><a href="../../../nw/font/TextWriter.html">nw::font::TextWriter</a></CODE> member functions that handle formatted character strings.<br /><br /> <CODE>nw::font::TextWriter::CalcFormatStringWidth</CODE><br /> <CODE>nw::font::TextWriter::CalcFormatStringHeight </CODE> <br /><CODE>nw::font::TextWriter::CalcFormatStringRect</CODE> <br /> <CODE>nw::font::TextWriter::Printf</CODE><br /> <CODE>nw::font::TextWriter::VPrintf</CODE> .
44</p><p>For the format that specifies only the buffer size, the buffer is specified such that it is allocated on the stack. <B>Note:</B> The stack may overflow if an attempt is made to allocate too large a buffer on the stack.</p><p>A buffer holding 256 characters is allocated on the stack by default.</p></div>
45  <hr><p>CONFIDENTIAL</p></body>
46</html>
47