root/trunk/docs/sdlttf.html

Revision 255, 2.0 kB (checked in by aldacron, 2 years ago)

[Docs]
* corrected several spelling mistakes
* tweaked the wording of a few passages to make for clarity or to just make them more proper
* fixed a couple of glaring bugs that caused some bits of text to be invisible
* deleted a some things that were no longer relevant

  • Property svn:mime-type set to text/html
  • Property svn:mim-type set to text/html
Line 
1 <html lang="en">
2 <head>
3     <title>DerelictSDLImage</title>
4     <link rel="stylesheet" type="text/css" href="styles.css">
5 </head>
6 <body>
7 <hr>
8 <hr>
9 <h2 align="center">DerelictSDLttf</h2>
10 <hr>
11 <hr>
12 <h3>Introduction</h3>
13 DerelictSDLttf is a D binding to Sam Lantinga's
14 <a href="http://www.libsdl.org/projects/SDL_ttf/">SDL_ttf</a>, a cross
15 platform library designed that allows you to use TrueType fonts with
16 <a href="http://www.libsdl.org/">SDL</a>.
17 <div class="important">This version of DerelictSDLttf requires SDL_ttf 2.0.7 or later.</div>
18
19 <h3>Using</h3>
20 <ol>
21 <li>Always make sure the DerelictSDLttf source modules are available on your import
22 path.</li>
23 <li>In modules that make use of DerelictSDLttf, you will need to import the
24 derelict.SDLttf.SDLttf module.</li>
25 <li>Before calling any SDLttf functions, you need to make a call to <tt>DerelictSDLttf.load()</tt>.
26 This will load the shared library.</li>
27 </ol>
28
29 <p>
30 The following is a complete program that loads DerelictSDLttf:
31 </p>
32
33 <p><hr><pre>
34 import derelict.sdl.ttf;
35
36 void main()
37 {
38     DerelictSDLttf.load();
39    
40     // now you can call SDL_ttf functions
41 }
42 </pre><hr></p>
43 <p>
44 As with other Derelict packages, DerelictSDLttf will throw an exception if an error
45 occurs while loading the shared library. For more information on Derelict
46 exceptions, see the documentation for
47 <a href="loading.html">Loading/Unloading Shared Libraries</a>.
48 </p>
49 <div class="note">In any module that calls SDL_ttf functions, you will also need
50 to import derelict.sdl.sdl. This is not required to load the library, as shown
51 above.</div>
52 <p>
53 Finally, the method <tt>DerelictSDLttf.unload()</tt> is provided for convenience. In normal
54 practice you do not need to call this function, as Derelict will unload the library
55 automatically when the app exits. You generally should only use this function if
56 you need to unload DerelictSDL while the application is running.
57 </p>
58
59 <h3>Dependencies</h3>
60 <a href="util.html">DerelictUtil</a>
61 <br /><a href="sdl.html">DerelictSDL</a>
62
63 </body>
64 </html>
Note: See TracBrowser for help on using the browser.