| 1 |
<html><head> |
|---|
| 2 |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
|---|
| 3 |
<meta content="text/javascript" http-equiv="content-script-type"> |
|---|
| 4 |
<title>luigi.font</title> |
|---|
| 5 |
<link rel="stylesheet" type="text/css" href="candydoc/style.css"> |
|---|
| 6 |
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="candydoc/ie56hack.css"><![endif]--> |
|---|
| 7 |
<script language="JavaScript" src="candydoc/util.js" type="text/javascript"></script> |
|---|
| 8 |
<script language="JavaScript" src="candydoc/tree.js" type="text/javascript"></script> |
|---|
| 9 |
<script language="JavaScript" src="candydoc/explorer.js" type="text/javascript"></script> |
|---|
| 10 |
</head><body> |
|---|
| 11 |
<div id="tabarea"></div><div id="explorerclient"></div> |
|---|
| 12 |
<div id="content"><script>explorer.initialize("luigi.font");</script> |
|---|
| 13 |
<table class="content"> |
|---|
| 14 |
<tr><td id="docbody"><h1>luigi.font</h1><!-- Generated by Ddoc from font.d --> |
|---|
| 15 |
<br><br> |
|---|
| 16 |
|
|---|
| 17 |
<script>explorer.outline.incSymbolLevel();</script> |
|---|
| 18 |
<dl> |
|---|
| 19 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 20 |
<dt><span class="decl">interface |
|---|
| 21 |
<span class="currsymbol">Font</span> |
|---|
| 22 |
<script>explorer.outline.addDecl('Font');</script> |
|---|
| 23 |
|
|---|
| 24 |
; |
|---|
| 25 |
</span></dt> |
|---|
| 26 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
<dd>An abstract interface for any font rendering tech that wants to be used by Luigi |
|---|
| 30 |
<br><br> |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
<script>explorer.outline.incSymbolLevel();</script> |
|---|
| 34 |
<dl> |
|---|
| 35 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 36 |
<dt><span class="decl">abstract float |
|---|
| 37 |
<span class="currsymbol">draw_char</span> |
|---|
| 38 |
<script>explorer.outline.addDecl('draw_char');</script> |
|---|
| 39 |
|
|---|
| 40 |
(dchar <span class="funcparam">c</span>); |
|---|
| 41 |
</span></dt> |
|---|
| 42 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
<dd>Draw a character using OpenGL commands at position (0,0,0) in current |
|---|
| 46 |
OpenGL coordinates. |
|---|
| 47 |
Return the number of units along the baseline to advance. |
|---|
| 48 |
|
|---|
| 49 |
<br><br> |
|---|
| 50 |
|
|---|
| 51 |
</dd> |
|---|
| 52 |
|
|---|
| 53 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 54 |
<dt><span class="decl">abstract float |
|---|
| 55 |
<span class="currsymbol">draw_string</span> |
|---|
| 56 |
<script>explorer.outline.addDecl('draw_string');</script> |
|---|
| 57 |
|
|---|
| 58 |
(char[] <span class="funcparam">str</span>); |
|---|
| 59 |
</span></dt> |
|---|
| 60 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
<dd>Draw a string using OpenGL commands at position (0,0,0) in current |
|---|
| 64 |
OpenGL coordinates. |
|---|
| 65 |
Return the number of units along the baseline to advance. |
|---|
| 66 |
A mixin is available to provide a default implementation of this based |
|---|
| 67 |
on draw_char. |
|---|
| 68 |
|
|---|
| 69 |
<br><br> |
|---|
| 70 |
|
|---|
| 71 |
</dd> |
|---|
| 72 |
|
|---|
| 73 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 74 |
<dt><span class="decl">abstract Rect |
|---|
| 75 |
<span class="currsymbol">string_rect</span> |
|---|
| 76 |
<script>explorer.outline.addDecl('string_rect');</script> |
|---|
| 77 |
|
|---|
| 78 |
(char[] <span class="funcparam">str</span>); |
|---|
| 79 |
</span></dt> |
|---|
| 80 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
<dd>Return the bounding box of the string assuming it will be drawn at |
|---|
| 84 |
location (0,0). |
|---|
| 85 |
Thus the x,y positions tell you about the leading and descender. |
|---|
| 86 |
+--------------------+ |
|---|
| 87 |
| <--w--> | ^ |
|---|
| 88 |
| | | |
|---|
| 89 |
(0,0) | | h |
|---|
| 90 |
+------|--------------------|-|---- |
|---|
| 91 |
|(x,y) | v |
|---|
| 92 |
+--------------------+ |
|---|
| 93 |
|
|---|
| 94 |
<br><br> |
|---|
| 95 |
|
|---|
| 96 |
</dd> |
|---|
| 97 |
|
|---|
| 98 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 99 |
<dt><span class="decl">abstract float |
|---|
| 100 |
<span class="currsymbol">height</span> |
|---|
| 101 |
<script>explorer.outline.addDecl('height');</script> |
|---|
| 102 |
|
|---|
| 103 |
(); |
|---|
| 104 |
</span></dt> |
|---|
| 105 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 |
<dd>Return the basic |
|---|
| 109 |
<span class="currsymbol">height</span> |
|---|
| 110 |
<script>explorer.outline.addDecl('height');</script> |
|---|
| 111 |
|
|---|
| 112 |
of the font |
|---|
| 113 |
<br><br> |
|---|
| 114 |
|
|---|
| 115 |
</dd> |
|---|
| 116 |
|
|---|
| 117 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 118 |
<dt><span class="decl">abstract float |
|---|
| 119 |
<span class="currsymbol">width</span> |
|---|
| 120 |
<script>explorer.outline.addDecl('width');</script> |
|---|
| 121 |
|
|---|
| 122 |
(); |
|---|
| 123 |
</span></dt> |
|---|
| 124 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 |
<dd>Return |
|---|
| 128 |
<span class="currsymbol">width</span> |
|---|
| 129 |
<script>explorer.outline.addDecl('width');</script> |
|---|
| 130 |
|
|---|
| 131 |
if font is fixed- |
|---|
| 132 |
<span class="currsymbol">width</span> |
|---|
| 133 |
<script>explorer.outline.addDecl('width');</script> |
|---|
| 134 |
|
|---|
| 135 |
, or -1 if the font is proportional |
|---|
| 136 |
<br><br> |
|---|
| 137 |
|
|---|
| 138 |
</dd> |
|---|
| 139 |
|
|---|
| 140 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 141 |
<dt><span class="decl">abstract Size |
|---|
| 142 |
<span class="currsymbol">origin</span> |
|---|
| 143 |
<script>explorer.outline.addDecl('origin');</script> |
|---|
| 144 |
|
|---|
| 145 |
(); |
|---|
| 146 |
</span></dt> |
|---|
| 147 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 |
<dd>Returns the location of the |
|---|
| 151 |
<span class="currsymbol">origin</span> |
|---|
| 152 |
<script>explorer.outline.addDecl('origin');</script> |
|---|
| 153 |
|
|---|
| 154 |
relative to a character's bounding box |
|---|
| 155 |
top-left corner. Below this would be something like (ox,oy)==(-5,7). |
|---|
| 156 |
Put another way, in order for the top left corner to appear at some (x,y) |
|---|
| 157 |
you should call draw_string with the coordinates set to (x+ox, y+oy) |
|---|
| 158 |
<br><br> |
|---|
| 159 |
(0,0)+------------+ |
|---|
| 160 |
| | |
|---|
| 161 |
| | |
|---|
| 162 |
(ox,oy) | | |
|---|
| 163 |
+------|------------|---- |
|---|
| 164 |
| | |
|---|
| 165 |
+------------+ |
|---|
| 166 |
|
|---|
| 167 |
<br><br> |
|---|
| 168 |
|
|---|
| 169 |
</dd> |
|---|
| 170 |
</dl> |
|---|
| 171 |
<script>explorer.outline.decSymbolLevel();</script> |
|---|
| 172 |
|
|---|
| 173 |
|
|---|
| 174 |
</dd> |
|---|
| 175 |
</dl> |
|---|
| 176 |
<script>explorer.outline.decSymbolLevel();</script> |
|---|
| 177 |
|
|---|
| 178 |
|
|---|
| 179 |
</td></tr> |
|---|
| 180 |
<tr><td id="docfooter"> |
|---|
| 181 |
Page was generated with |
|---|
| 182 |
<img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> |
|---|
| 183 |
on Wed Dec 6 09:51:44 2006 |
|---|
| 184 |
|
|---|
| 185 |
</td></tr> |
|---|
| 186 |
</table> |
|---|
| 187 |
</div> |
|---|
| 188 |
<script> |
|---|
| 189 |
explorer.packageExplorer.addModule("luigi.base"); |
|---|
| 190 |
explorer.packageExplorer.addModule("luigi.arranger"); |
|---|
| 191 |
explorer.packageExplorer.addModule("luigi.adapter"); |
|---|
| 192 |
explorer.packageExplorer.addModule("luigi.adapters.gld"); |
|---|
| 193 |
explorer.packageExplorer.addModule("luigi.adapters.glfw"); |
|---|
| 194 |
explorer.packageExplorer.addModule("luigi.event"); |
|---|
| 195 |
explorer.packageExplorer.addModule("luigi.font"); |
|---|
| 196 |
explorer.packageExplorer.addModule("luigi.gldraw"); |
|---|
| 197 |
explorer.packageExplorer.addModule("luigi.gui"); |
|---|
| 198 |
explorer.packageExplorer.addModule("luigi.theme"); |
|---|
| 199 |
explorer.packageExplorer.addModule("luigi.themes.std"); |
|---|
| 200 |
explorer.packageExplorer.addModule("luigi.themes.dxut"); |
|---|
| 201 |
explorer.packageExplorer.addModule("luigi.opengl"); |
|---|
| 202 |
explorer.packageExplorer.addModule("luigi.signalobj"); |
|---|
| 203 |
explorer.packageExplorer.addModule("wrapres");</script> |
|---|
| 204 |
</body></html> |
|---|