[cello-cvs] CVS cello/cl-ftgl/ftgl-int
fgoenninger
fgoenninger at common-lisp.net
Wed Aug 23 20:08:43 UTC 2006
Update of /project/cello/cvsroot/cello/cl-ftgl/ftgl-int
In directory clnet:/tmp/cvs-serv27566
Modified Files:
FTGLFromC.cpp
Log Message:
Changed: Some of the functions seem to be referencing deleted functions in FTGL (2.1.2).
--- /project/cello/cvsroot/cello/cl-ftgl/ftgl-int/FTGLFromC.cpp 2006/05/17 16:14:29 1.1
+++ /project/cello/cvsroot/cello/cl-ftgl/ftgl-int/FTGLFromC.cpp 2006/08/23 20:08:43 1.2
@@ -1,4 +1,3 @@
-#include <assert.h>
/*
;;;
;;; Copyright © 2004 by Kenneth William Tilton.
@@ -21,6 +20,15 @@
;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
;;; IN THE SOFTWARE.
*/
+
+/* $Id */
+
+/* ========================================================================== */
+/* INCLUDES */
+/* ========================================================================== */
+
+#include <assert.h>
+
#include "FTGLBitmapFont.h"
#include "FTBitmapGlyph.h"
@@ -36,45 +44,60 @@
#include "FTGLPolygonFont.h"
#include "FTPolyGlyph.h"
-#include "FTGLOutlineFont.h"
-#include "FTOutlineGlyph.h"
+#include "FTGLOutlineFont.h"
+#include "FTOutlineGlyph.h"
-#include "FTGLExtrdFont.h"
-#include "FTExtrdGlyph.h"
+#include "FTGLExtrdFont.h"
+#include "FTExtrdGlyph.h"
+/* We only need __stdcall for Windows */
+#if !defined(WINDOWS)
+#define __stdcall
+#endif
+
+/* ========================================================================== */
+/* INTERFACE FUNCTIONS */
+/* ========================================================================== */
extern "C" {
- void __stdcall fgcBuildGlyphs( FTFont* f )
- {
- f->BuildGlyphs();
- }
-
- bool __stdcall fgcSetFaceSize( FTFont* f
- , unsigned int faceSize
- , unsigned int res )
- {
- return f->FaceSize( faceSize, res );
- }
+/* void __stdcall fgcBuildGlyphs( FTFont* f )
+{
+ f->BuildGlyphs();
+}
+*/
+bool __stdcall fgcSetFaceSize( FTFont* f,
+ unsigned int faceSize,
+ unsigned int res )
+{
+ return f->FaceSize( faceSize, res );
+}
-float __stdcall fgcAscender( FTFont* f ) {
- return f->Ascender( );
+float __stdcall fgcAscender( FTFont* f )
+{
+ return f->Ascender();
}
-float __stdcall fgcDescender( FTFont* f ) {
- return f->Descender( );
+float __stdcall fgcDescender( FTFont* f )
+{
+ return f->Descender();
}
-float __stdcall fgcStringAdvance( FTFont* f, const char* string ) {
- return f->Advance( string );
+float __stdcall fgcStringAdvance( FTFont* f, const char* string )
+{
+ return f->Advance( string );
}
-int __stdcall fgcCharTexture( FTFont* f, int chr ) {
- return ((FTGlyph *) f->FontGlyph( chr ))->glRendering();
- //return f->GlyphRendering( chr );
+/*
+int __stdcall fgcCharTexture( FTFont* f, int chr )
+{
+ return ((FTGlyph *) f->BuildGlyph( chr ))->glRendering();
+ //return f->GlyphRendering( chr );
}
+*/
+
/*
void FTFont::DoRender( const unsigned int chr, const unsigned int nextChr)
{
@@ -88,64 +111,72 @@
-float __stdcall fgcStringX( FTFont* f, const char* string ) {
- float llx,lly,llz,urx,ury,urz;
+float __stdcall fgcStringX( FTFont* f, const char* string )
+{
+ float llx,lly,llz,urx,ury,urz;
- f->BBox( string, llx, lly, llz, urx, ury, urz );
- return llx;
+ f->BBox( string, llx, lly, llz, urx, ury, urz );
+ return llx;
}
-void __stdcall fgcRender( FTFont* f, const char *string ) {
- f->Render( string );
+void __stdcall fgcRender( FTFont* f, const char *string )
+{
+ f->Render( string );
}
-void __stdcall fgcFree( FTFont* f ) {
- delete f;
+void __stdcall fgcFree( FTFont* f )
+{
+ delete f;
}
//--------- Bitmap ----------------------------------------------
-FTGLBitmapFont* __stdcall fgcBitmapMake( const char* fontname ) {
- return new FTGLBitmapFont( fontname );
+FTGLBitmapFont* __stdcall fgcBitmapMake( const char* fontname )
+{
+ return new FTGLBitmapFont( fontname );
}
//--------- Pixmap ----------------------------------------------
-FTGLPixmapFont* __stdcall fgcPixmapMake( const char* fontname ) {
- return new FTGLPixmapFont( fontname );
+FTGLPixmapFont* __stdcall fgcPixmapMake( const char* fontname )
+{
+ return new FTGLPixmapFont( fontname );
}
//--------- Texture ----------------------------------------------
-FTGLTextureFont* __stdcall fgcTextureMake( const char* fontname ) {
- return new FTGLTextureFont( fontname );
+FTGLTextureFont* __stdcall fgcTextureMake( const char* fontname )
+{
+ return new FTGLTextureFont( fontname );
}
//--------- Polygon ----------------------------------------------
-FTGLPolygonFont* __stdcall fgcPolygonMake( const char* fontname ) {
- return new FTGLPolygonFont( fontname );
+FTGLPolygonFont* __stdcall fgcPolygonMake( const char* fontname )
+{
+ return new FTGLPolygonFont( fontname );
}
//--------- Outline ----------------------------------------------
-FTGLOutlineFont* __stdcall fgcOutlineMake( const char* fontname ) {
- return new FTGLOutlineFont( fontname );
+FTGLOutlineFont* __stdcall fgcOutlineMake( const char* fontname )
+{
+ return new FTGLOutlineFont( fontname );
}
//--------- Extruded Polygon -------------------------------------
-FTGLExtrdFont* __stdcall fgcExtrudedMake( const char* fontname ) {
- return new FTGLExtrdFont( fontname );
-}
-
-
-bool __stdcall fgcSetFaceDepth( FTGLExtrdFont* f
- , float depth ) {
- f->Depth( depth );
- return true;
+FTGLExtrdFont* __stdcall fgcExtrudedMake( const char* fontname )
+{
+ return new FTGLExtrdFont( fontname );
}
+bool __stdcall fgcSetFaceDepth( FTGLExtrdFont* f, float depth )
+{
+ f->Depth( depth );
+ return true;
}
+} // extern "C"
+
More information about the Cello-cvs
mailing list