SFont.hpp   StelFont.hpp 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#ifndef _SFONT_H_ #ifndef _STELFONT_HPP_
#define _SFONT_H_ #define _STELFONT_HPP_
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif
#include <QString> #include <QString>
#include <QChar> #include <QChar>
#include "StelUtils.hpp"
#include "typeface.h" #include "typeface.h"
/* /*
* Wrapper class on the TypeFace class used to display fonts in openGL * Wrapper class on the TypeFace class used to display fonts in openGL
*/ */
class SFont class StelFont
{ {
public: public:
SFont(float sizeI, const QString& ttfFileName); StelFont(float sizeI, const QString& ttfFileName);
~SFont() {;} ~StelFont() {;}
void print(float x, float y, const QString& s, int upsidedown = 1) c onst void print(float x, float y, const QString& s, int upsidedown = 1) c onst
{ {
typeFace.render(s, Vec2f(x, y), upsidedown==1); typeFace.render(s, Vec2f(x, y), upsidedown==1);
} }
void printChar(const QChar c) const void printChar(const QChar c) const
{ {
typeFace.renderGlyphs(c); typeFace.renderGlyphs(c);
} }
void printCharOutlined(const QChar c) const; void printCharOutlined(const QChar c) const;
float getStrLen(const QString& s) const {return typeFace.width(s);} float getStrLen(const QString& s) const {return typeFace.width(s);}
float getLineHeight(void) const {return typeFace.lineHeight();} float getLineHeight(void) const {return typeFace.lineHeight();}
float getAscent(void) const {return typeFace.ascent();} float getAscent(void) const {return typeFace.ascent();}
float getDescent(void) const {return typeFace.descent();} float getDescent(void) const {return typeFace.descent();}
float getSize(void) const {return typeFace.pointSize();} float getSize(void) const {return typeFace.pointSize();}
private:
mutable TypeFace typeFace; mutable TypeFace typeFace;
}; };
#endif // _SFONT_H_ #endif // _STELFONT_HPP_
 End of changes. 6 change blocks. 
8 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/