source: OGRE/trunk/ogrenew/Docs/api/html/OgreFont_8h-source.html @ 657

Revision 657, 24.6 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1<html>
2<head>
3<title>OgreFont.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4<link type="text/css" rel="stylesheet" href="style.css">
5</head>
6
7<body>
8<!-- Generated by Doxygen 1.3.6 -->
9<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
10<h1>OgreFont.h</h1><a href="OgreFont_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*-------------------------------------------------------------------------</span>
1100002 <span class="comment">This source file is a part of OGRE</span>
1200003 <span class="comment">(Object-oriented Graphics Rendering Engine)</span>
1300004 <span class="comment"></span>
1400005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span>
1500006 <span class="comment"></span>
1600007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span>
1700008 <span class="comment">Also see acknowledgements in Readme.html</span>
1800009 <span class="comment"></span>
1900010 <span class="comment">This library is free software; you can redistribute it and/or modify it</span>
2000011 <span class="comment">under the terms of the GNU Lesser General Public License (LGPL) as </span>
2100012 <span class="comment">published by the Free Software Foundation; either version 2.1 of the </span>
2200013 <span class="comment">License, or (at your option) any later version.</span>
2300014 <span class="comment"></span>
2400015 <span class="comment">This library is distributed in the hope that it will be useful, but </span>
2500016 <span class="comment">WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY </span>
2600017 <span class="comment">or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public </span>
2700018 <span class="comment">License for more details.</span>
2800019 <span class="comment"></span>
2900020 <span class="comment">You should have received a copy of the GNU Lesser General Public License </span>
3000021 <span class="comment">along with this library; if not, write to the Free Software Foundation, </span>
3100022 <span class="comment">Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA or go to</span>
3200023 <span class="comment">http://www.gnu.org/copyleft/lesser.txt</span>
3300024 <span class="comment">-------------------------------------------------------------------------*/</span>
3400025
3500026 <span class="preprocessor">#ifndef _Font_H__</span>
3600027 <span class="preprocessor"></span><span class="preprocessor">#define _Font_H__</span>
3700028 <span class="preprocessor"></span>
3800029 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span>
3900030 <span class="preprocessor">#include "<a class="code" href="OgreResource_8h.html">OgreResource.h</a>"</span>
4000031 <span class="preprocessor">#include "<a class="code" href="OgreTexture_8h.html">OgreTexture.h</a>"</span>
4100032 <span class="preprocessor">#include "<a class="code" href="OgreMaterial_8h.html">OgreMaterial.h</a>"</span>
4200033
4300034 <span class="keyword">namespace </span>Ogre
4400035 {
4500036     <span class="comment">// Define the number of glyphs allowed</span>
4600037     <span class="comment">// We ignore 0-31 since these are control characters</span>
4700038 <span class="preprocessor">#if OGRE_WCHAR_T_STRINGS</span>
4800039 <span class="preprocessor"></span>    <span class="comment">// Allow wide chars</span>
4900040 <span class="preprocessor">    #define OGRE_NUM_GLYPHS (1024 - 32)</span>
5000041 <span class="preprocessor"></span><span class="preprocessor">#else</span>
5100042 <span class="preprocessor"></span>    <span class="comment">// Allow 8-bit ASCII </span>
5200043     <span class="comment">// (we don't want to offend people with charcodes 127-256 in their name eh cearny? ;)</span>
5300044     <span class="comment">// Only chars 33+ are any use though</span>
54<a name="l00045"></a><a class="code" href="OgreFont_8h.html#a0">00045</a> <span class="preprocessor">    #define OGRE_NUM_GLYPHS (256 - 32)</span>
5500046 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
5600047 <span class="preprocessor"></span>
5700048     <span class="comment">// How to look up chars</span>
58<a name="l00049"></a><a class="code" href="OgreFont_8h.html#a1">00049</a> <span class="preprocessor">    #define OGRE_GLYPH_INDEX(c) c - 33</span>
5900050 <span class="preprocessor"></span>
60<a name="l00052"></a><a class="code" href="namespaceOgre.html#a650">00052</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a650">FontType</a>
6100053     {
6200055         <a class="code" href="namespaceOgre.html#a650a125">FT_TRUETYPE</a> = 1,
6300057         <a class="code" href="namespaceOgre.html#a650a126">FT_IMAGE</a> = 2
6400058     };
6500059
6600060
67<a name="l00074"></a><a class="code" href="classOgre_1_1Font.html">00074</a>     <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> Font : <span class="keyword">public</span> <a class="code" href="classOgre_1_1Resource.html">Resource</a>, <span class="keyword">public</span> <a class="code" href="classOgre_1_1ManualResourceLoader.html">ManualResourceLoader</a>
6800075     {
6900076     <span class="keyword">protected</span>:
70<a name="l00078"></a><a class="code" href="classOgre_1_1Font_1_1CmdType.html">00078</a>         <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> CmdType : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a>
7100079         {
7200080         <span class="keyword">public</span>:
7300081             <a class="code" href="namespaceOgre.html#a426">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>;
7400082             <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; val);
7500083         };
76<a name="l00085"></a><a class="code" href="classOgre_1_1Font_1_1CmdSource.html">00085</a>         <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> CmdSource : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a>
7700086         {
7800087         <span class="keyword">public</span>:
7900088             <a class="code" href="namespaceOgre.html#a426">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>;
8000089             <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; val);
8100090         };
82<a name="l00092"></a><a class="code" href="classOgre_1_1Font_1_1CmdSize.html">00092</a>         <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> CmdSize : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a>
8300093         {
8400094         <span class="keyword">public</span>:
8500095             <a class="code" href="namespaceOgre.html#a426">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>;
8600096             <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; val);
8700097         };
88<a name="l00099"></a><a class="code" href="classOgre_1_1Font_1_1CmdResolution.html">00099</a>         <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> CmdResolution : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a>
8900100         {
9000101         <span class="keyword">public</span>:
9100102             <a class="code" href="namespaceOgre.html#a426">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>;
9200103             <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; val);
9300104         };
9400105
9500106         <span class="comment">// Command object for setting / getting parameters</span>
96<a name="l00107"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontt0">00107</a>         <span class="keyword">static</span> CmdType msTypeCmd;
97<a name="l00108"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontt1">00108</a>         <span class="keyword">static</span> CmdSource msSourceCmd;
98<a name="l00109"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontt2">00109</a>         <span class="keyword">static</span> CmdSize msSizeCmd;
99<a name="l00110"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontt3">00110</a>         <span class="keyword">static</span> CmdResolution msResolutionCmd;
10000111
101<a name="l00113"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp0">00113</a>         <a class="code" href="namespaceOgre.html#a650">FontType</a> mType;
10200114
103<a name="l00116"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp1">00116</a>         <a class="code" href="namespaceOgre.html#a426">String</a> mSource;
10400117
105<a name="l00119"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp2">00119</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> mTtfSize;
106<a name="l00121"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp3">00121</a>         <a class="code" href="namespaceOgre.html#a423">uint</a> mTtfResolution;
10700122
10800123
109<a name="l00125"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp4">00125</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> mTexCoords_u1[<a class="code" href="OgreFont_8h.html#a0">OGRE_NUM_GLYPHS</a>];
110<a name="l00127"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp5">00127</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> mTexCoords_u2[<a class="code" href="OgreFont_8h.html#a0">OGRE_NUM_GLYPHS</a>];
111<a name="l00129"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp6">00129</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> mTexCoords_v1[<a class="code" href="OgreFont_8h.html#a0">OGRE_NUM_GLYPHS</a>];
112<a name="l00131"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp7">00131</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> mTexCoords_v2[<a class="code" href="OgreFont_8h.html#a0">OGRE_NUM_GLYPHS</a>];
11300132
114<a name="l00134"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp8">00134</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> mAspectRatio[<a class="code" href="OgreFont_8h.html#a0">OGRE_NUM_GLYPHS</a>];
11500135
116<a name="l00137"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp9">00137</a>         <a class="code" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a> mpMaterial;
11700138
118<a name="l00140"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp10">00140</a>         <a class="code" href="classOgre_1_1TexturePtr.html">TexturePtr</a> mTexture;
11900141
120<a name="l00143"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontp11">00143</a>         <span class="keywordtype">bool</span> mAntialiasColour;
12100144
12200146         <span class="keywordtype">void</span> createTextureFromFont(<span class="keywordtype">void</span>);
12300147
12400149         <span class="keyword">virtual</span> <span class="keywordtype">void</span> loadImpl();
12500151         <span class="keyword">virtual</span> <span class="keywordtype">void</span> unloadImpl();
126<a name="l00153"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fontb3">00153</a>         size_t calculateSize(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; } <span class="comment">// permanent resource is in the texture </span>
12700154     <span class="keyword">public</span>:
12800155
12900159         Font(<a class="code" href="classOgre_1_1ResourceManager.html">ResourceManager</a>* creator, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; name, <a class="code" href="namespaceOgre.html#a485">ResourceHandle</a> handle,
13000160             <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; group, <span class="keywordtype">bool</span> isManual = <span class="keyword">false</span>, <a class="code" href="classOgre_1_1ManualResourceLoader.html">ManualResourceLoader</a>* loader = 0);
13100161         <span class="keyword">virtual</span> ~Font();
13200162
13300164         <span class="keywordtype">void</span> setType(FontType ftype);
13400165
13500167         <a class="code" href="namespaceOgre.html#a650">FontType</a> getType(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
13600168
13700182         <span class="keywordtype">void</span> setSource(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; source);
13800183
13900186         <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; getSource(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
14000187
14100193         <span class="keywordtype">void</span> setTrueTypeSize(<a class="code" href="namespaceOgre.html#a420">Real</a> ttfSize);
14200198         <span class="keywordtype">void</span> setTrueTypeResolution(<a class="code" href="namespaceOgre.html#a423">uint</a> ttfResolution);
14300199
14400206         <a class="code" href="namespaceOgre.html#a420">Real</a> getTrueTypeSize(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
14500211         <a class="code" href="namespaceOgre.html#a423">uint</a> getTrueTypeResolution(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
14600212
14700215         std::pair&lt; uint, uint &gt; StrBBox( <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a> &amp; text, <a class="code" href="namespaceOgre.html#a420">Real</a> char_height, <a class="code" href="classOgre_1_1RenderWindow.html">RenderWindow</a> &amp; window  );
14800216
14900217
150<a name="l00223"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fonta11">00223</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> getGlyphTexCoords(OgreChar <span class="keywordtype">id</span>, <a class="code" href="namespaceOgre.html#a420">Real</a>&amp; u1, <a class="code" href="namespaceOgre.html#a420">Real</a>&amp; v1, <a class="code" href="namespaceOgre.html#a420">Real</a>&amp; u2, <a class="code" href="namespaceOgre.html#a420">Real</a>&amp; v2 )<span class="keyword"> const</span>
15100224 <span class="keyword">        </span>{
15200225             <span class="keywordtype">unsigned</span> <a class="code" href="OgrePrerequisites_8h.html#a5">OgreChar</a> idx = <a class="code" href="OgreFont_8h.html#a1">OGRE_GLYPH_INDEX</a>(<span class="keywordtype">id</span>);
15300226             u1 = mTexCoords_u1[ idx ];
15400227             v1 = mTexCoords_v1[ idx ];
15500228             u2 = mTexCoords_u2[ idx ];
15600229             v2 = mTexCoords_v2[ idx ];
15700230         }
15800231
159<a name="l00238"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fonta12">00238</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> setGlyphTexCoords( OgreChar <span class="keywordtype">id</span>, <a class="code" href="namespaceOgre.html#a420">Real</a> u1, <a class="code" href="namespaceOgre.html#a420">Real</a> v1, <a class="code" href="namespaceOgre.html#a420">Real</a> u2, <a class="code" href="namespaceOgre.html#a420">Real</a> v2 )
16000239         {
16100240             <span class="keywordtype">unsigned</span> <a class="code" href="OgrePrerequisites_8h.html#a5">OgreChar</a> idx = <a class="code" href="OgreFont_8h.html#a1">OGRE_GLYPH_INDEX</a>(<span class="keywordtype">id</span>);
16200241             mTexCoords_u1[ idx ] = u1;
16300242             mTexCoords_v1[ idx ] = v1;
16400243             mTexCoords_u2[ idx ] = u2;
16500244             mTexCoords_v2[ idx ] = v2;
16600245             mAspectRatio[ idx ] = ( u2 - u1 ) / ( v2 - v1 );
16700246         }
168<a name="l00248"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fonta13">00248</a>         <span class="keyword">inline</span> <a class="code" href="namespaceOgre.html#a420">Real</a> getGlyphAspectRatio( OgreChar <span class="keywordtype">id</span> )<span class="keyword"> const</span>
16900249 <span class="keyword">        </span>{
17000250             <span class="keywordtype">unsigned</span> <a class="code" href="OgrePrerequisites_8h.html#a5">OgreChar</a> idx = <a class="code" href="OgreFont_8h.html#a1">OGRE_GLYPH_INDEX</a>(<span class="keywordtype">id</span>);
17100251             <span class="keywordflow">return</span> mAspectRatio[ idx ];
17200252         }
173<a name="l00258"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fonta14">00258</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> setGlyphAspectRatio( OgreChar <span class="keywordtype">id</span>, <a class="code" href="namespaceOgre.html#a420">Real</a> ratio )
17400259         {
17500260             <span class="keywordtype">unsigned</span> <a class="code" href="OgrePrerequisites_8h.html#a5">OgreChar</a> idx = <a class="code" href="OgreFont_8h.html#a1">OGRE_GLYPH_INDEX</a>(<span class="keywordtype">id</span>);
17600261             mAspectRatio[ idx ] = ratio;
17700262         }
178<a name="l00267"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fonta15">00267</a>         <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a>&amp; getMaterial()<span class="keyword"> const</span>
17900268 <span class="keyword">        </span>{
18000269             <span class="keywordflow">return</span> mpMaterial;
18100270         }
182<a name="l00275"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fonta16">00275</a>         <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a>&amp; getMaterial()
18300276         {
18400277             <span class="keywordflow">return</span> mpMaterial;
18500278         }
186<a name="l00290"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fonta17">00290</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> setAntialiasColour(<span class="keywordtype">bool</span> enabled)
18700291         {
18800292             mAntialiasColour = enabled;
18900293         }
19000294
191<a name="l00298"></a><a class="code" href="classOgre_1_1Font.html#Ogre_1_1Fonta18">00298</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> getAntialiasColour(<span class="keywordtype">void</span>)<span class="keyword"> const</span>
19200299 <span class="keyword">        </span>{
19300300             <span class="keywordflow">return</span> mAntialiasColour;
19400301         }
19500302
19600306         <span class="keywordtype">void</span> loadResource(<a class="code" href="classOgre_1_1Resource.html">Resource</a>* resource);
19700307     };
198<a name="l00314"></a><a class="code" href="classOgre_1_1FontPtr.html">00314</a>     <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> FontPtr : <span class="keyword">public</span> <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Font&gt;
19900315     {
20000316     <span class="keyword">public</span>:
201<a name="l00317"></a><a class="code" href="classOgre_1_1FontPtr.html#Ogre_1_1FontPtra0">00317</a>         FontPtr() : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Font&gt;() {}
202<a name="l00318"></a><a class="code" href="classOgre_1_1FontPtr.html#Ogre_1_1FontPtra1">00318</a>         <span class="keyword">explicit</span> FontPtr(Font* rep) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Font&gt;(rep) {}
203<a name="l00319"></a><a class="code" href="classOgre_1_1FontPtr.html#Ogre_1_1FontPtra2">00319</a>         FontPtr(<span class="keyword">const</span> FontPtr&amp; r) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Font&gt;(r) {}
204<a name="l00320"></a><a class="code" href="classOgre_1_1FontPtr.html#Ogre_1_1FontPtra3">00320</a>         FontPtr(<span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">ResourcePtr</a>&amp; r) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Font&gt;()
20500321         {
20600322             <span class="comment">// lock &amp; copy other mutex pointer</span>
20700323             <a class="code" href="OgrePrerequisites_8h.html#a14">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
20800324             <a class="code" href="OgrePrerequisites_8h.html#a19">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
20900325             pRep = static_cast&lt;Font*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
21000326             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
21100327             <span class="keywordflow">if</span> (pUseCount)
21200328             {
21300329                 ++(*pUseCount);
21400330             }
21500331         }
21600332
217<a name="l00334"></a><a class="code" href="classOgre_1_1FontPtr.html#Ogre_1_1FontPtra4">00334</a>         FontPtr&amp; operator=(<span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">ResourcePtr</a>&amp; r)
21800335         {
21900336             <span class="keywordflow">if</span> (pRep == static_cast&lt;Font*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>()))
22000337                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
22100338             release();
22200339             <span class="comment">// lock &amp; copy other mutex pointer</span>
22300340             <a class="code" href="OgrePrerequisites_8h.html#a14">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
22400341             <a class="code" href="OgrePrerequisites_8h.html#a19">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
22500342             pRep = static_cast&lt;Font*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
22600343             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
22700344             <span class="keywordflow">if</span> (pUseCount)
22800345             {
22900346                 ++(*pUseCount);
23000347             }
23100348             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
23200349         }
23300350     };
23400351 }
23500352
23600353 <span class="preprocessor">#endif</span>
237</pre></div><hr>
238<p>
239Copyright &copy; 2000-2005 by The OGRE Team<br />
240<!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/>
241This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/>
242                <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
243                <Work rdf:about="">
244                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
245        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
246                </Work>
247                <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
248
249Last modified Sun Feb 12 12:59:44 2006
250</p>
251</body>
252</html>
Note: See TracBrowser for help on using the repository browser.